/* Theme Switcher Styles */
/* .theme-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
} */

html {
    scroll-behavior: smooth;
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Core Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #0a0a0a;
    color: #fff;
    height: 100vh;
}

#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.interface-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    padding: 20px;
    gap: 20px;
}

.ai-presence {
    width: 300px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    max-height: 95vh;
    overflow: hidden;
}

.ai-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.ai-avatar-container {
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
}

.ai-avatar-frame {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.ai-avatar-frame.phone-avatar, .ai-avatar.phone-avatar, .ai-avatar-container.phone-avatar {
    width: 90px;
    height: 90px;
}

.ai-avatar-frame.phone-avatar 
{
    display:flex;
}

.ai-avatar-container-phone {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: solid 1px rgba(0, 255, 255, 0.2);
}

.ai-avatar-container-phone {
    padding-left: 15px;
}

.ai-status.phone-avatar
{
    padding-left:25px;
}

.status-text.phone-avatar
{
    font-size: 28px;
    
}

.status-dot.phone-avatar
{
    width:15px;
    height:15px;
}



.avatar-inner.phone-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.avatar-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
}

.avatar-ring-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    animation: ringPulse 2s infinite;
}

.ai-avatar {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(0, 255, 255, 0.3);
    position: relative;
}

.ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.quick-actions .action-button {
    width: 100%;
    box-sizing: border-box;
}

.action-button {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 0.9em;
}

.action-button:hover {
    background: rgba(0, 255, 255, 0.2) !important;
    border: 1px solid #00ffff;
}

.action-icon {
    width: 20px;
    height: 20px;
    background: rgba(0, 255, 255, 0.3);
    border-radius: 50%;
}

.chat-container {
    flex: 1;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 255, 255, 0.1);
    overflow: hidden;
    max-height: 95vh;
}

.chat-header {
    padding: 20px;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.version-tag {
    background: rgba(0, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.9em;
    color: #00ffff;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* .new-session-btn {
    background: rgba(0, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.new-session-btn:hover {
    background: rgba(0, 255, 255, 0.2);
} */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 0;
    scroll-behavior: smooth;
}

.message {
    max-width: 80%;
    padding: 12px;
    border-radius: 15px;
    animation: fadeIn 0.3s ease-out;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message.user-message {
    background: rgba(0, 255, 255, 0.1);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.message.ai-message {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.system-message {
    background: rgba(255, 165, 0, 0.1);
    align-self: center;
    text-align: center;
    font-size: 0.9em;
    border: 1px solid rgba(255, 165, 0, 0.2);
    max-width: 90%;
}



.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }

.chat-input-container {
    padding: 20px;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    padding-left: 12px;
    padding-right: 12px;  
    padding-top: 5px;
    padding-bottom: 5px;
    color: white;
    outline: none;

    /* Added properties for dynamic resizing */
    height: auto;
    min-height: 40px; /* Height for a single line */
    max-height: 66px; /* Height for two lines */
    overflow-y: scroll; /* Hide scrollbar initially */
    resize: none; /* Prevent manual resizing */
    line-height: 20px; /* Adjust based on font-size */
    transition: height 0.2s ease; /* Smooth height transition */
    align-content: center;
}

.send-button {
    background: rgba(0, 255, 255, 0.2);
    border: none;
    border-radius: 10px;
    padding: 0 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.send-button:hover {
    background: rgba(0, 255, 255, 0.3);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    padding: 25px;
    border-radius: 15px;
    max-width: 480px;
    width: 90%;
    border: 1px solid rgba(0, 255, 255, 0.2);
    position: relative;
    font-size: 0.9em;
    line-height: 1.5;
}

.modal-content h2 {
    font-size: 1.3em;
    margin-bottom: 12px;
}

.modal-content p {
    margin: 8px 0;
}

.close-about-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-about-button:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
    transform: scale(1.1);
}

/* Music Player Styles */
.music-therapy-section {
    background: rgba(0, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px;
    margin-top: 20px;
}

.music-therapy-section h3 {
    margin-bottom: 6px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}

.music-player {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 6px;
}

.now-playing {
    margin-bottom: 5px;
}

.track-info {
    margin-bottom: 2px;
}

.track-name {
    font-weight: 500;
    color: #00ffff;
    font-size: 0.85em;
}

.track-category {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.6);
}

.track-duration {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 10px 0;
    position: relative;
    cursor: pointer;
}

.progress {
    height: 100%;
    background: #00ffff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1em;
    padding: 3px;
    transition: color 0.3s;
}

.control-btn:hover {
    color: #00ffff;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.volume-slider {
    width: 50px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
}

.therapy-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin-top: 6px;
}

.preset-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.75em;
}

.preset-btn:hover {
    background: rgba(0, 255, 255, 0.2);
}

.preset-btn.active {
    background: rgba(0, 255, 255, 0.3);
    border-color: #00ffff;
}



/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes thinking {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes typeWriter {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.2);
    border-radius: 4px;
}

.ai-avatar-container-phone
    {
        display:none;
    }

/* Media Queries */
@media (max-width: 1071px) {
    .header-controls .action-button {
        min-height: 50px;
    }
}

@media (max-width: 768px) {
    .message {
        max-width: 95%;
    }
    
    .chat-input-container
    {
        padding: 10px;
    }

    .chat-messages {

        min-height: 50vh; /* Ensures it grows beyond if necessary */
        max-height: 50vh; /* Limits excessive growth */

    }
    .ai-avatar-container-desktop
    {
        display:none;
    }
    .ai-avatar-container-phone
    {
        display:block;
    }

    .interface-container {
        flex-direction: column;
        padding: 10px;
    }

    .ai-presence {
        width: 100%;
        order: 2;
    }

    .chat-container {
        width: 100%;
        order: 1;
    }

    .chat-header {
        padding: 15px;
        flex-direction: row;
        justify-content: space-between;
        min-height: 80px;
    }

    .title-section {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .title-section h2 {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .version-tag {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    .header-controls {
        display: flex;
        flex-direction: row;
        gap: 8px;
        align-self: center;
    }

    .header-controls .action-button {
        padding: 8px;
        font-size: 0.9rem;
        min-height: 54px;
        margin-left: 6px;
    }
}

/* Theme Transition Styles */
.chat-header,
.new-session-btn,
.send-button,
.version-tag,
.message,
.chat-input,
.action-button,
.preset-btn {
    transition: all 0.3s ease;
}


/* Markdown Styles */
.markdown-content {
    width: 100%;
}

.markdown-content h1 {
    font-size: 1.8em;
    margin-bottom: 0.5em;
    color: inherit;
}

.markdown-content h2 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    color: inherit;
}

.markdown-content ul {
    list-style-type: disc;
    margin-left: 1.5em;
}

.markdown-content ol {
    list-style-type: decimal;
    margin-left: 1.5em;
}

.markdown-content code {
    background-color: rgba(0,0,0,0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

.markdown-content pre {
    background-color: rgba(0,0,0,0.1);
    padding: 1em;
    border-radius: 5px;
    margin: 1em 0;
}

.markdown-content p {
    margin-bottom: 1em;
}

.markdown-content a {
    color: #00ffff;
    text-decoration: underline;
}

/** Styling for messages */
.message.ai {
    background: rgba(25, 45, 65, 0.5);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    white-space: pre-wrap;
    /* line-height: 2.5;  */
    padding: 12px;
    padding-bottom: 12px;
}

.message.ai p {
    margin: 0 0 12px 0;
    padding: 0;
}

.message.ai p:last-child {
    margin-bottom: 0;
}

.typed-content {
    display: inline-block;
}

.message.ai br {
    display: block;
    content: "";
    margin-top: 10px;
}

.message-thinking {
    display: flex;
    gap: 5px;
    padding: 10px;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    background: rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    animation: thinking 1s infinite;
}

/* Styling for <h1> inside .message.ai */
.message.ai h1 {
    font-size: 2rem;
    color: #68c7c5;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #68c7c5;
    line-height: 42px;
}

/* Styling for <h2> inside .message.ai */
.message.ai h2 {
    font-size: 1.75rem;
    color: #ffffff;
    font-weight: bold;
    padding-bottom: 10px;
    line-height: 38px;
}

/* Styling for <h3> inside .message.ai */
.message.ai h3 {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: bold;
}

/* Styling for <p> inside .message.ai */
.message.ai p {
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.5;
    padding-bottom: 10px;
}

/* Styling for <ul> inside .message.ai */
.message.ai ul {
    padding-left: 20px;
}

/* Styling for <li> inside .message.ai */
.message.ai li {
    font-size: 1rem;
    color: #76e9e6;
    line-height: 1.5;
    padding-bottom: 10px;
    list-style-type: none;
    position: relative;
    padding-left: 24px;
}

.message.ai li::before {
    color: #76e9e6;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1rem;
    content: "✦";
}

/* Styling for <li> inside .message.ai */
.message.ai li:empty {
    /* color: red !important; */
    display: none;
}

.breathing-exercise-window {
    width: 100%;
    height: 95vh;
    border: none;
}

/* Wallet and Payment UI Styles */
.balance-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.balance-display:hover {
    background: rgba(0, 255, 255, 0.12);
    border-color: rgba(0, 255, 255, 0.35);
    transform: translateY(-1px);
}

.balance-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

.balance-amount {
    color: #00ffff;
    font-weight: 600;
    font-size: 1em;
}

#messages-display {
    background: rgba(0, 255, 100, 0.08);
    border: 1px solid rgba(0, 255, 100, 0.25);
    padding: 8px 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

#messages-display:hover {
    background: rgba(0, 255, 100, 0.12);
    border-color: rgba(0, 255, 100, 0.35);
}

#messages-display .balance-amount {
    color: #00ff64;
}

/* Smart Wallet React Component Styling */
#wallet-root {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

#smart-wallet-button {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85em;
    font-family: 'Roboto', sans-serif;
    white-space: nowrap;
}

#smart-wallet-button:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.4);
}

/* Session active state */
#smart-wallet-button[data-session="active"] {
    background: rgba(0, 255, 100, 0.1);
    border-color: rgba(0, 255, 100, 0.3);
}

#smart-wallet-button[data-session="active"]:hover {
    background: rgba(0, 255, 100, 0.2);
    border-color: rgba(0, 255, 100, 0.4);
}

.balance-label {
    color: rgba(255, 255, 255, 0.7);
}

.balance-amount {
    color: #00ffff;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

#wallet-button {
    min-width: 140px;
    justify-content: center;
}

.pricing-info {
    animation: fadeIn 0.5s ease-out;
}

.payment-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.payment-success {
    border-color: rgba(0, 255, 0, 0.5);
    background: rgba(0, 255, 0, 0.1);
}

.payment-error {
    border-color: rgba(255, 0, 0, 0.5);
    background: rgba(255, 0, 0, 0.1);
}

/* Settings Modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.settings-content {
    background: rgba(20, 20, 20, 0.95);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.settings-content h3 {
    margin-bottom: 20px;
    color: #00ffff;
}

.settings-content input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    color: white;
    margin-bottom: 15px;
    font-family: 'JetBrains Mono', monospace;
}

.settings-content button {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    margin-right: 10px;
}

.settings-content button:hover {
    background: rgba(0, 255, 255, 0.3);
}

/* Mobile responsiveness for wallet UI */
@media (max-width: 768px) {
    .message {
        max-width: 95%;
    }
    
    .chat-input-container {
        padding: 10px;
    }

    .chat-messages {
        min-height: 50vh;
        max-height: 50vh;
    }
    
    .ai-avatar-container-desktop {
        display:none;
    }
    
    .ai-avatar-container-phone {
        display:block;
    }

    .interface-container {
        flex-direction: column;
        padding: 10px;
    }

    .ai-presence {
        width: 100%;
        order: 2;
    }

    .chat-container {
        width: 100%;
        order: 1;
    }

    .chat-header {
        padding: 10px;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        min-height: auto;
        gap: 10px;
    }

    .title-section {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
    }

    .title-section h2 {
        font-size: 0.95rem;
        line-height: 1.2;
        flex-shrink: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .version-tag {
        font-size: 0.7rem;
        padding: 2px 6px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .header-controls {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .header-controls .action-button {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-height: auto;
        height: 40px;
        margin-left: 0;
        width: 100%;
        white-space: nowrap;
    }

    #wallet-root {
        width: 100%;
    }

    #wallet-root button {
        width: 100% !important;
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
        height: 40px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.3 !important;
    }
}
        flex-wrap: wrap;
    }

    .header-controls .action-button {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-height: auto;
        height: 36px;
        margin-left: 0;
        flex: 1;
        min-width: 80px;
        white-space: nowrap;
    }

    #wallet-root {
        flex: 1;
        min-width: 100px;
    }

    #wallet-root button {
        width: 100%;
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
        height: 36px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

}

}

/* Fix About modal on mobile */
@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh !important;
        overflow-y: auto !important;
        margin: 20px !important;
        padding: 20px !important;
    }
    
    .modal-content h2 {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }
    
    .modal-content p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
}

}

@media (max-width: 768px) {
    .header-controls .theme-btn {
        max-width: 100px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
        flex: 0 0 auto !important;
    }
}

@media (max-width: 768px) {
    .header-controls {
        display: flex;
        flex-direction: row !important;
        gap: 8px;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .header-controls #wallet-root {
        flex: 1 1 calc(50% - 4px);
        min-width: 140px;
    }
    
    .header-controls .theme-btn {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 140px !important;
        height: 40px !important;
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
    }
}

@media (max-width: 768px) {
    .header-controls {
        display: flex;
        flex-direction: row !important;
        gap: 8px;
        width: 100%;
        align-items: center;
    }
    
    .header-controls #wallet-root {
        flex: 1;
    }
    
    .header-controls .theme-btn {
        flex: 0 0 auto !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 1.2rem !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Fix About modal on mobile */
@media (max-width: 768px) {
    .modal {
        padding: 10px !important;
    }
    
    .modal-content {
        max-height: 90vh !important;
        overflow-y: auto !important;
        padding: 15px !important;
        margin: 0 !important;
    }
    
    .modal-content h2 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
    }
    
    .modal-content p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-top: 8px !important;
    }
    
    .modal-content strong {
        font-size: 0.85rem !important;
    }
    
    .modal-content br {
        display: none;
    }
    
    .close-about-button {
        font-size: 1.5rem !important;
        padding: 5px 10px !important;
    }
}

/* Mobile Modal Fixes */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
        font-size: 0.85em;
    }
    
    .modal-content h2 {
        font-size: 1.2em;
        padding: 15px 20px;
        padding-right: 55px;
    }
    
    .modal-content p {
        padding: 15px 20px;
        line-height: 1.8;
    }
    
    .close-about-button {
        width: 32px;
        height: 32px;
        top: 12px;
        right: 12px;
        font-size: 1.4em;
    }
}




/* Mobile specific - tighter spacing */
@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh !important;
        font-size: 0.88em !important;
    }
    
    .modal-content p {
        padding: 18px 22px !important;
        line-height: 1.4 !important;
    }
    
    .modal-content p br {
        display: block;
        content: "";
        margin-top: 4px;
    }
    
    .modal-content p strong {
        margin-top: 10px !important;
        margin-bottom: 4px !important;
    }
    
    .modal-content h2 {
        padding: 18px 20px !important;
    }
}


/* Mobile specific - more section spacing */
@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh !important;
        font-size: 0.88em !important;
    }
    
    .modal-content p {
        padding: 18px 22px !important;
        line-height: 1.5 !important;
    }
    
    .modal-content p br {
        display: block;
        content: "";
        margin-top: 6px;
    }
    
    .modal-content p strong {
        margin-top: 14px !important;
        margin-bottom: 8px !important;
    }
    
    .modal-content h2 {
        padding: 18px 20px !important;
    }
}

/* Modal fixes - scrolling on both PC and mobile */
.modal-content {
    max-height: 80vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal-content h2 {
    flex-shrink: 0 !important;
}

.modal-content p {
    overflow-y: auto !important;
    flex: 1 !important;
    line-height: 1.5 !important;
}

.modal-content p strong {
    margin-top: 14px !important;
    margin-bottom: 8px !important;
}

/* Mobile specific */
@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh !important;
        font-size: 0.88em !important;
    }
    
    .modal-content p {
        padding: 18px 22px !important;
        line-height: 1.5 !important;
    }
    
    .modal-content p br {
        display: block;
        content: "";
        margin-top: 6px;
    }
    
    .modal-content h2 {
        padding: 18px 20px !important;
    }
}
