/* Satoshi Font Family */
@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-BlackItalic.otf') format('opentype');
    font-weight: 900;
    font-style: italic;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f7 100%);
    color: #1d1d1f;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(254, 254, 254, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 80px; /* Fixed height for consistency */
    transition: all 0.3s ease;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%; /* Fill the fixed navbar height */
}

/* Chat page - center aligned logo */
.nav-logo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.navbar-logo {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: block;
    cursor: pointer;
    z-index: 1001;
}

.logo-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    pointer-events: none; /* Ensure span doesn't block clicks */
}

/* Index page navigation styles */
.nav-logo {
    /* Left aligned logo for index page */
    flex-shrink: 0;
}

.nav-menu {
    /* Navigation menu container */
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.navbar-nav a {
    text-decoration: none;
    color: #666;
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.navbar-nav a:hover {
    color: #1a1a1a;
}

.try-miigo-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.try-miigo-btn:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Mobile menu styles - matching send/mic/user buttons exactly */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    margin-left: auto;
}

/* Force hamburger menu to show on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

.mobile-menu-toggle:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle:focus {
    outline: 3px solid rgba(0, 122, 255, 0.4);
    outline-offset: 2px;
}

.hamburger-icon {
    width: 20px;
    height: 16px;
}

/* User/Auth icon styling - matching other buttons */

.mobile-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(254, 254, 254, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.mobile-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-content {
    padding: 1.5rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.mobile-menu-link {
    display: block;
    padding: 1rem 2rem;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

.mobile-menu-link:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    transform: translateX(8px);
}

.try-miigo-mobile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    margin: 1rem 2rem 0.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    transform: translateX(0) !important;
}

.try-miigo-mobile:hover {
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px) !important;
}

.navbar-right {
    flex: 1;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
}

.auth-icon, .voice-toggle-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    flex-shrink: 0;
    margin-right: 12px;
}

.auth-icon:hover, .voice-toggle-icon:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

.auth-icon:active, .voice-toggle-icon:active {
    transform: scale(0.95);
}

.auth-icon.logged-in {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.auth-icon.logged-in:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.voice-toggle-icon.voice-enabled {
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    border: none;
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.3);
}

.voice-toggle-icon.voice-enabled:hover {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 32px rgba(52, 199, 89, 0.4);
}

.voice-toggle-icon.voice-disabled {
    background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
    border: none;
    box-shadow: 0 8px 24px rgba(255, 59, 48, 0.3);
}

.voice-toggle-icon.voice-disabled:hover {
    background: linear-gradient(135deg, #d70015 0%, #b50000 100%);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 59, 48, 0.4);
}

.user-icon, .voice-on-icon, .voice-off-icon {
    width: 20px;
    height: 20px;
    color: white;
}

.auth-icon:not(.logged-in) .user-icon {
    color: #667eea;
}

.voice-toggle-icon:not(.voice-enabled) .voice-on-icon,
.voice-toggle-icon:not(.voice-enabled) .voice-off-icon {
    color: #667eea;
}

.voice-toggle-icon.voice-enabled .voice-on-icon,
.voice-toggle-icon.voice-enabled .voice-off-icon {
    color: white;
}

.voice-toggle-icon.voice-disabled .voice-on-icon,
.voice-toggle-icon.voice-disabled .voice-off-icon {
    color: white;
}

/* Input Section Wrapper */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* Voice Toggle Absolutely Positioned */
.voice-toggle-absolute {
    position: absolute;
    bottom: 120px;
    right: 2rem;
    z-index: 100;
}

/* Input wrapper container with vertical flex */
.input-wrapper-container {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
}

.voice-toggle-above-input {
    width: 30px;
    height: 30px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.voice-toggle-above-input:hover {
    background: #f1f3f4;
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.voice-toggle-above-input svg {
    width: 14px;
    height: 14px;
    color: #6b7280;
}

.voice-toggle-above-input .voice-on-icon {
    display: block;
}

.voice-toggle-above-input .voice-off-icon {
    display: none;
}

.voice-toggle-above-input.voice-disabled .voice-on-icon {
    display: none;
}

.voice-toggle-above-input.voice-disabled .voice-off-icon {
    display: block;
}

.voice-toggle-above-input.voice-enabled {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.voice-toggle-above-input.voice-enabled:hover {
    background: #f1f3f4;
    border-color: #d1d5db;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.voice-toggle-above-input.voice-disabled {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.voice-toggle-above-input.voice-disabled:hover {
    background: #f1f3f4;
    border-color: #d1d5db;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.voice-toggle-above-input.voice-enabled svg,
.voice-toggle-above-input.voice-disabled svg {
    color: #6b7280;
}

/* Container and layout */
.container {
    max-width: 780px;
    margin: 0 auto;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: calc(64px + 1rem) 2rem 1rem;
    box-sizing: border-box;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Chat messages - now directly in main container */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 2rem;
    padding-right: 2.5rem;
    min-height: 0;
    max-height: calc(100vh - 200px);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #d1d1d6;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1aa;
}

.message {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    animation: fadeInUp 0.3s ease-out;
}

/* Mobile message spacing */
@media (max-width: 768px) {
    .message {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .message {
        margin-bottom: 0.75rem;
    }
}

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

.user-message {
    justify-content: flex-end;
}

.miigo-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 1.25rem 1.5rem;
    border-radius: 24px;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    font-weight: 400;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 8px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.miigo-message .message-content {
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
    border-bottom-left-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.miigo-greeting-message {
    justify-content: center;
    margin-bottom: 24px;
}

.miigo-greeting-message .message-content {
    background: linear-gradient(135deg, #B7C6B1 0%, #a5b49f 100%);
    color: white;
    max-width: 90%;
    text-align: center;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-message {
    margin-bottom: 2rem;
}

/* Mobile welcome message spacing */
@media (max-width: 768px) {
    .welcome-message {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .welcome-message {
        margin-bottom: 0.5rem;
    }
}

.personalized-welcome {
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
    border-bottom-left-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Input container */
.input-container {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    position: relative;
}

.input-wrapper {
    flex: 1;
    max-width: 700px;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 28px;
    padding: 1rem 1rem 1rem 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 56px;
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.12);
    transform: none;
}

.message-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    line-height: 1.5;
    outline: none;
    color: #1d1d1f;
    font-family: inherit;
    font-weight: 400;
    padding-right: 0.5rem;
    resize: none;
    min-height: 24px;
    overflow: hidden;
    word-wrap: break-word;
    white-space: pre-wrap;
    transition: height 0.2s ease;
    vertical-align: middle;
    padding-top: 0;
    padding-bottom: 0;
}

.message-input::placeholder {
    color: #8e8e93;
    font-weight: 400;
    text-align: left;
    line-height: 1.5;
}

.mic-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.mic-button {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.mic-button:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.mic-button:active {
    transform: scale(0.96) translateY(-1px);
}

.mic-button.listening {
    background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
    animation: pulse 1.5s infinite;
    box-shadow: 0 4px 20px rgba(255, 59, 48, 0.35);
}

.mic-button.listening:hover {
    background: linear-gradient(135deg, #d70015 0%, #b50000 100%);
    box-shadow: 0 8px 32px rgba(255, 59, 48, 0.45);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 59, 48, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

.mic-icon {
    width: 20px;
    height: 20px;
    color: white;
    z-index: 2;
    position: relative;
}

.mic-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    opacity: 0;
    z-index: 1;
}

.mic-button.listening .mic-pulse {
    animation: micPulse 1s infinite;
}

@keyframes micPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

/* Recording state styles */
.mic-button.recording {
    background: #dc3545;
    animation: recordingPulse 2s infinite;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
    transform: none !important;
    width: 44px !important;
    height: 44px !important;
}

.mic-button.recording:hover {
    background: #c82333;
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.5);
    transform: none !important;
}

.mic-button.recording .mic-icon {
    display: none;
}

.mic-button.recording::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 3px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes recordingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Recording timer styles */
.recording-timer {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.6rem;
    white-space: nowrap;
    font-weight: 600;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    animation: timerFadeIn 0.3s ease-out;
    z-index: 10;
}

@keyframes timerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* Responsive timer positioning */
@media (max-width: 768px) {
    .recording-timer {
        bottom: 60px;
        left: 15px;
        font-size: 0.65rem;
        padding: 0.1rem 0.35rem;
    }
}

@media (max-width: 480px) {
    .recording-timer {
        bottom: 55px;
        left: 20px;
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
}

.send-button-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.send-button-icon:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.send-button-icon:active {
    transform: scale(0.95);
}

.send-button-icon:disabled {
    background: linear-gradient(135deg, #d1d1d6 0%, #b5b5b8 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.send-icon {
    width: 20px;
    height: 20px;
    color: white;
}

/* Typing indicator */
.typing-indicator {
    opacity: 0;
    animation: fadeInUp 0.3s ease-out forwards;
}

.typing-content {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #8e8e93;
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDots {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Error toast */
.error-toast {
    position: fixed;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(255, 59, 48, 0.4);
    z-index: 2001;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
    backdrop-filter: blur(20px);
}

/* Success message styling */
.error-toast.success {
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    box-shadow: 0 12px 40px rgba(52, 199, 89, 0.4);
}

/* Info message styling */
.error-toast.info {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    box-shadow: 0 12px 40px rgba(0, 122, 255, 0.4);
}

.error-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.error-message {
    font-size: 0.9375rem;
    font-weight: 500;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.error-close:hover {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .navbar-content {
        padding: 0 1rem;
        height: 100%; /* Ensure tablet navbar content fills height */
    }

    .navbar-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 40px;
        height: 40px;
    }

    .hamburger-icon {
        width: 18px;
        height: 14px;
    }

    .auth-icon, .voice-toggle-icon {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }

    .user-icon, .voice-on-icon, .voice-off-icon {
        width: 18px;
        height: 18px;
    }

    .navbar-logo {
        font-size: 1.5rem;
    }

    .container {
        padding: 2rem 1.5rem;
    }

    .message-content {
        max-width: 85%;
        font-size: 1.0625rem;
        padding: 1rem 1.25rem;
    }

    .input-container {
        gap: 1rem;
    }

    .input-wrapper {
        padding: 0.875rem 0.875rem 0.875rem 1.25rem;
        max-width: none;
    }

    .message-input {
        font-size: 1.0625rem;
    }

    .send-button-icon {
        width: 40px;
        height: 40px;
    }

    .send-icon {
        width: 18px;
        height: 18px;
    }

    .mic-button {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    /* Fixed navbar at top */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        height: 80px; /* Maintain consistent height on mobile */
    }

    .navbar-content {
        padding: 0 1rem;
        height: 100%; /* Ensure mobile navbar content fills height */
    }

    .navbar-logo {
        font-size: 1.75rem;
    }

    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
    }

    .hamburger-icon {
        width: 16px;
        height: 12px;
    }

    .auth-icon, .voice-toggle-icon {
        width: 36px;
        height: 36px;
        margin-right: 6px;
    }

    .user-icon, .voice-on-icon, .voice-off-icon {
        width: 16px;
        height: 16px;
    }

    /* Adjust body to account for fixed navbar */
    body {
        padding-top: 80px; /* Account for navbar height */
        padding-bottom: 110px; /* Account for input area height */
    }

    .container {
        padding: 0;
        height: calc(100vh - 190px); /* Full height minus navbar and input */
        display: flex;
        flex-direction: column;
    }

    .main {
        flex: 1;
        padding: 0;
        margin: 0 0.25rem;
        overflow-y: auto;
        max-height: calc(100vh - 190px);
        display: flex;
        flex-direction: column;
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 0.5rem 0.25rem;
        padding-right: 0.75rem;
    }

    /* Voice toggle absolute positioning for mobile */
    .voice-toggle-absolute {
        position: fixed;
        bottom: 130px;
        right: 1rem;
        z-index: 1001;
    }

    /* Fixed input area at bottom */
    .input-wrapper-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0.75rem 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .input-container {
        display: flex;
        gap: 1rem;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .message-content {
        max-width: 90%;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 20px;
    }

    .input-wrapper {
        border-radius: 24px;
        padding: 0.75rem 0.75rem 0.75rem 1rem;
        max-width: none;
    }

    .send-button-icon {
        width: 36px;
        height: 36px;
    }

    .send-icon {
        width: 16px;
        height: 16px;
    }

    .mic-button {
        width: 36px;
        height: 36px;
    }

    .mic-button.recording {
        width: 36px !important;
        height: 36px !important;
    }
}

/* Consent Banner */
.consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 2rem;
}

.consent-overlay.hidden {
    display: none;
}

.consent-banner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
    padding: 3rem;
    max-width: 520px;
    text-align: center;
    animation: consentSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes consentSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.consent-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.03em;
}

.consent-content p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #666;
    margin: 0 0 2rem 0;
}

.consent-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.consent-secondary-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.consent-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    min-width: 180px;
}

.consent-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.consent-reject {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.consent-reject:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #444;
}

.consent-learn-more {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.consent-learn-more:hover {
    color: #5a6fd8;
}

.privacy-content {
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 1rem;
}

.privacy-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 1.5rem 0 0.75rem 0;
}

.privacy-content h3:first-child {
    margin-top: 0;
}

.privacy-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin: 0 0 1rem 0;
}

.privacy-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
    padding: 0;
}

.privacy-content li {
    font-size: 1rem;
    line-height: 1.5;
    color: #666;
    margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
    .consent-banner {
        padding: 2rem;
        margin: 1rem;
        max-width: none;
    }

    .consent-content h2 {
        font-size: 1.75rem;
    }

    .consent-content p {
        font-size: 1rem;
    }

    .consent-actions {
        gap: 0.75rem;
    }

    .consent-accept {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-width: 160px;
    }
}

/* Message formatting styles */
.message-content .message-paragraph {
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
}

.message-content .message-paragraph:last-child {
    margin-bottom: 0;
}

.message-content .message-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: inherit;
    margin: 1rem 0 0.5rem 0;
    line-height: 1.3;
}

.message-content .message-heading:first-child {
    margin-top: 0;
}

.message-content .message-subheading {
    font-size: 1.05rem;
    font-weight: 600;
    color: inherit;
    margin: 0.75rem 0 0.375rem 0;
    line-height: 1.3;
}

.message-content .message-subheading:first-child {
    margin-top: 0;
}

.message-content .formatted-list {
    margin: 0.5rem 0 0.75rem 1.25rem;
    padding: 0;
}

.message-content .formatted-list:last-child {
    margin-bottom: 0;
}

.message-content .formatted-list li {
    margin-bottom: 0.375rem;
    line-height: 1.5;
}

.message-content .formatted-list li:last-child {
    margin-bottom: 0;
}

.message-content strong {
    font-weight: 600;
    color: inherit;
}

.message-content em {
    font-style: italic;
    color: inherit;
}

/* Ensure proper spacing for mixed content */
.message-content .message-heading + .formatted-list,
.message-content .message-subheading + .formatted-list {
    margin-top: 0.25rem;
}

.message-content .formatted-list + .message-paragraph,
.message-content .formatted-list + .message-heading,
.message-content .formatted-list + .message-subheading {
    margin-top: 0.75rem;
}

/* Voice control section styles */
.voice-control-section {
    padding: 1.5rem 0;
}

.voice-control-description {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.voice-control-description p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Voice settings styles */
.voice-settings-section {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

/* Settings form elements */
.setting-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Journal section styles */
.journal-section {
    padding: 1.5rem 0;
    max-width: 100%;
}

.journal-description {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.journal-description p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.journal-editor {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.journal-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s ease;
}

.journal-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.journal-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.9);
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.3s ease;
}

.journal-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.journal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.save-entry-btn, .reflect-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-entry-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.save-entry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.reflect-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid #667eea;
}

.reflect-btn:hover {
    background: #667eea;
    color: white;
}

.journal-entries {
    margin-top: 2rem;
}

.entries-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.entries-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

/* Journal entries group - matching topic category styling */
.journal-entries-group {
    margin-bottom: 20px;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    overflow: hidden;
}

.journal-entries-title {
    background: #f5f5f7;
    padding: 12px 16px;
    font-weight: 600;
    color: #1d1d1f;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.journal-entry-count {
    background: #B7C6B1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.journal-entry {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    background: white;
    transition: all 0.2s ease;
}

.journal-entry:last-child {
    border-bottom: none;
}

.journal-entry:hover {
    background: #fafafa;
    transform: none;
    box-shadow: none;
}

.journal-entry-delete-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
}

.journal-entry:hover .journal-entry-delete-btn {
    opacity: 1;
    transform: scale(1);
}

.journal-entry-delete-btn:hover {
    background: #fee;
    color: #e74c3c;
}

.journal-entry-delete-btn:active {
    transform: scale(0.95);
}

.journal-entry-content {
    flex: 1;
    min-width: 0;
}

.entry-title {
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 6px;
    font-size: 14px;
}

.entry-preview {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.entry-date {
    color: #999;
    font-size: 11px;
    font-weight: 500;
}

.entry-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.view-entry-btn, .delete-entry-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-entry-btn:hover {
    background: #f0f8ff;
    color: #0066cc;
}

.delete-entry-btn:hover {
    background: #fff5f5;
    color: #dc3545;
}

/* Mobile responsiveness for journal */
@media (max-width: 768px) {
    .journal-section {
        padding: 1rem 0;
    }

    .journal-editor {
        padding: 1rem;
    }

    .journal-actions {
        flex-direction: column;
    }

    .save-entry-btn, .reflect-btn {
        width: 100%;
        text-align: center;
    }

    .entry-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .entry-actions {
        width: 100%;
        justify-content: space-between;
    }

    .view-entry-btn, .delete-entry-btn {
        flex: 1;
        text-align: center;
    }
}

/* Personality Hub Styles */
.personality-hub {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.personality-header {
    text-align: center;
    margin-bottom: 3rem;
}

.personality-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.personality-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin: 0 0 1rem 0;
    letter-spacing: -0.03em;
}

.personality-subtitle {
    font-size: 1.125rem;
    color: #6e6e73;
    line-height: 1.6;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.personality-tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.test-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.test-card:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
}

.test-card:hover::before {
    opacity: 1;
}

.test-card:active {
    transform: translateY(-2px);
}

.test-icon {
    font-size: 2rem;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.test-icon svg {
    width: 28px;
    height: 28px;
    color: #667eea;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.test-card:hover .test-icon {
    transform: scale(1.1) translateY(-2px);
}

.test-card:hover .test-icon svg {
    color: #5a6fd8;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

.test-content {
    flex: 1;
    z-index: 2;
    position: relative;
}

.test-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.test-status {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    display: inline-block;
}

.test-status.not-started {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.test-status.in-progress {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.test-status.completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.test-arrow {
    font-size: 1.25rem;
    color: #6e6e73;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.test-card:hover .test-arrow {
    color: #667eea;
    transform: translateX(4px);
}

.personality-actions {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.save-sync-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.save-sync-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.save-sync-btn:active {
    transform: translateY(0);
}

/* Mobile responsive for personality hub */
@media (max-width: 768px) {
    .personality-hub {
        padding: 1.5rem 0;
    }

    .personality-header {
        margin-bottom: 2rem;
    }

    .personality-logo {
        font-size: 3rem;
    }

    .personality-title {
        font-size: 2rem;
    }

    .personality-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .personality-tests-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .test-card {
        padding: 1.25rem;
    }

    .test-icon {
        font-size: 1.75rem;
    }

    .test-name {
        font-size: 1rem;
    }

    .save-sync-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .personality-tests-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .test-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .test-content {
        order: 2;
    }

    .test-arrow {
        order: 3;
        transform: rotate(90deg);
    }

    .test-card:hover .test-arrow {
        transform: rotate(90deg) translateX(4px);
    }

    .personality-title {
        font-size: 1.75rem;
    }

    .personality-logo {
        font-size: 2.5rem;
    }
}

/* Journal view modal styles */
.journal-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.journal-view-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.journal-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.journal-view-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.close-journal-view {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-journal-view:hover {
    color: #333;
}

.journal-view-meta {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.journal-view-date {
    margin-right: 1rem;
}

.journal-view-mood {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.journal-view-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
}

.journal-view-body p {
    margin: 0;
    color: #333;
    white-space: pre-wrap;
}

.journal-view-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.reflect-journal-btn, .close-journal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reflect-journal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.reflect-journal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.close-journal-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.close-journal-btn:hover {
    background: #e9ecef;
}

@media (max-width: 768px) {
    .journal-view-content {
        width: 95%;
        max-height: 90vh;
    }

    .journal-view-header {
        padding: 1rem;
    }

    .journal-view-body {
        padding: 1rem;
    }

    .journal-view-actions {
        padding: 1rem;
        flex-direction: column;
    }

    .reflect-journal-btn, .close-journal-btn {
        width: 100%;
    }
}

.voice-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.voice-slider {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    appearance: none;
    margin: 0.5rem 0;
}

.voice-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.voice-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.voice-slider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.standard-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.standard-btn:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.standard-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .voice-settings-section {
        padding: 0.75rem;
        margin-top: 0.75rem;
    }

    .voice-select {
        padding: 0.625rem;
        font-size: 0.85rem;
    }

    .standard-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
        width: 100%;
    }
}

/* Focus and accessibility */
.message-input:focus {
    outline: none;
}

.send-button-icon:focus,
.mic-button:focus,
.auth-icon:focus {
    outline: 3px solid rgba(0, 122, 255, 0.4);
    outline-offset: 2px;
}

.mic-button:focus {
    outline-color: rgba(0, 122, 255, 0.5);
}

/* Auth Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    margin: 1rem;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show .auth-modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.03em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6e6e73;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group {
    flex: 1;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007aff;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group input::placeholder {
    color: #6e6e73;
}

.auth-submit {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.011em;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
}

.auth-submit:hover {
    background: linear-gradient(135deg, #0051d5 0%, #003db3 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.auth-divider span {
    color: #6e6e73;
    font-size: 0.875rem;
    font-weight: 500;
}

.google-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: white;
    color: #1d1d1f;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.011em;
}

.google-auth:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    font-size: 14px;
    color: #666;
}

/* Consent Group in Signup */
.consent-group {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.consent-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.consent-question {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
}

.consent-subtext {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #B7C6B1;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* User Dropdown Menu */
.user-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    width: 280px;
    z-index: 99999;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: visible;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.user-dropdown.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    background: #B7C6B1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.user-info-small {
    min-width: 0;
    flex: 1;
}

.user-name-small {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email-small {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-menu {
    padding: 8px 0;
}

.dropdown-item {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #1a1a1a;
    transition: background-color 0.2s ease;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item:active {
    background: #e9ecef;
}

.dropdown-item svg {
    color: #666;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

.logout-item {
    color: #ff4757;
}

.logout-item:hover {
    background: #fff5f5;
}

.logout-item svg {
    color: #ff4757;
}

/* Profile Content Modal */
.profile-content-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1a1a1a;
}

.profile-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.user-profile-header {
    padding: 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: #B7C6B1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 20px;
    color: white;
}

.user-details h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #1a1a1a;
}

.user-details p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.user-profile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
    padding: 0 24px;
}

.tab-button {
    background: none;
    border: none;
    padding: 16px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tab-button:hover {
    color: #1a1a1a;
}

.tab-button.active {
    color: #B7C6B1;
    border-bottom-color: #B7C6B1;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #1a1a1a;
}

.empty-state {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
}

/* Goals Section */
.add-goal {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.add-goal input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.add-goal-btn {
    background: #B7C6B1;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.add-goal-btn:hover {
    background: #a5b49f;
}

/* Conversation Topics */
.conversation-topics {
    padding: 0;
}

.topics-header {
    margin-bottom: 24px;
    padding: 16px;
    background: #f5f5f7;
    border-radius: 8px;
}

.topics-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.topic-category-group {
    margin-bottom: 20px;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    overflow: hidden;
}

.topic-category-title {
    background: #f5f5f7;
    padding: 12px 16px;
    font-weight: 600;
    color: #1d1d1f;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-count {
    background: #B7C6B1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.topic-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-content {
    flex: 1;
    min-width: 0;
}

/* Topic Boxes - Outlined containers */
.topic-box {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    background: white;
}

.topic-header {
    background: #B7C6B1; /* Same color as "Save Goals & Plan" button */
    padding: 12px 16px;
    border-bottom: 1px solid #d1d5db;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.topic-conversations {
    padding: 0;
}

.conversation-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.conversation-item:last-child {
    border-bottom: none;
}

.conversation-content {
    flex: 1;
    min-width: 0;
}

.conversation-summary {
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
    margin-bottom: 4px;
    font-size: 14px;
}

.conversation-date {
    font-size: 12px;
    color: #9ca3af;
}

.conversation-delete-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0;
}

.conversation-item:hover .conversation-delete-btn {
    opacity: 1;
}

.conversation-delete-btn:hover {
    background: #fee;
    color: #e74c3c;
}

.expand-btn {
    width: 100%;
    padding: 12px 16px;
    background: #f9fafb;
    border: none;
    border-top: 1px solid #f3f4f6;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.expand-btn:hover {
    background: #f3f4f6;
}

.hidden-conversations {
    border-top: 1px solid #f3f4f6;
}

.topic-delete-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
}

.topic-item:hover .topic-delete-btn {
    opacity: 1;
    transform: scale(1);
}

.topic-delete-btn:hover {
    background: #fee;
    color: #e74c3c;
}

.topic-delete-btn:active {
    transform: scale(0.95);
}

.topic-summary {
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 6px;
    font-size: 14px;
}

.topic-details {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.topic-date {
    color: #999;
    font-size: 11px;
    font-weight: 500;
}

.topic-more {
    padding: 8px 16px;
    color: #007aff;
    font-size: 12px;
    font-weight: 500;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    text-align: center;
}

.topic-more-button {
    padding: 8px 16px;
    color: #007aff;
    font-size: 12px;
    font-weight: 500;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
}

.topic-more-button:hover {
    background: #f0f8ff;
    color: #0066cc;
}

.topic-more-button:active {
    transform: scale(0.98);
}

.expand-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.topic-hidden-items {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.goal-item {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.goal-text {
    flex: 1;
    font-size: 14px;
}

.goal-actions {
    display: flex;
    gap: 8px;
}

.goal-action {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s ease;
}

.goal-action:hover {
    background: #e9ecef;
    color: #1a1a1a;
}

/* Settings Section */
.settings-section {
    max-width: 400px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.setting-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.setting-input:focus {
    outline: none;
    border-color: #B7C6B1;
}

.setting-input:read-only {
    background: #f8f9fa;
    color: #666;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-bottom: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.2s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #B7C6B1;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.save-settings-btn {
    background: #B7C6B1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.save-settings-btn:hover {
    background: #a5b49f;
}

.consent-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 8px 0 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.consent-recommendation {
    display: block;
    font-size: 12px;
    color: #667eea;
    margin-top: 6px;
    font-weight: 500;
}

/* Dynamic Consent Messages */
.consent-message {
    margin: 8px 0 16px 0;
}

.consent-message-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.consent-enabled {
    background: #f0f9f0;
    border: 1px solid #c3e6c3;
    border-left: 4px solid #28a745;
}

.consent-disabled {
    background: #fff5f5;
    border: 1px solid #f5c6c6;
    border-left: 4px solid #dc3545;
}

.consent-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.consent-text {
    flex: 1;
    line-height: 1.5;
}

.consent-text p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.consent-text p:last-child {
    margin-bottom: 0;
}

.consent-note {
    font-size: 13px !important;
    color: #666 !important;
    font-style: italic;
}

.consent-enabled .consent-text p strong {
    color: #155724;
}

.consent-disabled .consent-text p strong {
    color: #721c24;
}

/* Billing Section */
.subscription-info, .usage-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.subscription-info h5, .usage-info h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.plan-name {
    font-size: 18px;
    font-weight: 600;
    color: #B7C6B1;
    margin: 0 0 8px 0;
}

.plan-description {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.usage-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.usage-label {
    color: #666;
}

.usage-value {
    font-weight: 600;
    color: #1a1a1a;
}

/* Account Section */
.account-section {
    max-width: 400px;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.account-avatar {
    width: 60px;
    height: 60px;
    background: #B7C6B1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.account-details h5 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.account-details p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #666;
}

.account-status {
    color: #28a745 !important;
    font-weight: 500;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #6e6e73;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
}

.finish-setup-banner {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(0, 81, 213, 0.1) 100%);
    border: 2px solid rgba(0, 122, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.finish-setup-content h6 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1d1d1f;
}

.finish-setup-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #6e6e73;
}

.finish-setup-btn {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
    white-space: nowrap;
}

.finish-setup-btn:hover {
    background: linear-gradient(135deg, #0051d5 0%, #003db3 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

/* Profile Navigation */
.profile-navigation {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 16px 20px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #1a1a1a;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-btn:hover {
    background: #f8f9fa;
    border-color: #e5e5e5;
}

.nav-btn svg {
    color: #666;
    flex-shrink: 0;
}

.logout-nav {
    color: #ff4757 !important;
    margin-top: 8px;
}

.logout-nav:hover {
    background: #fff5f5 !important;
    border-color: #ff4757 !important;
}

.logout-nav svg {
    color: #ff4757 !important;
}

/* Profile Footer */
.profile-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.logout-btn {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    border-color: #ff4757;
    color: #ff4757;
}

/* Memory Suggestions */
.memory-suggestion {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin: 12px 0;
    padding: 16px;
    animation: slideInUp 0.3s ease-out;
}

.memory-suggestion-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.memory-suggestion-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.memory-category {
    display: inline-block;
    background: #B7C6B1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    text-transform: capitalize;
}

.memory-suggestion-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.memory-save-btn, .memory-dismiss-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.memory-save-btn {
    background: #B7C6B1;
    color: white;
}

.memory-save-btn:hover {
    background: #a5b39f;
}

.memory-dismiss-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.memory-dismiss-btn:hover {
    background: #e9ecef;
}

.memory-confirmation {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    font-size: 14px;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

/* Signup prompt for anonymous users */
.signup-prompt {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    animation: fadeInUp 0.4s ease-out;
}

.signup-prompt-content {
    text-align: center;
}

.signup-prompt-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.signup-prompt-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.signup-prompt-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.signup-prompt-yes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.signup-prompt-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

.signup-prompt-no {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.signup-prompt-no:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

/* Mobile responsive for signup prompt */
@media (max-width: 768px) {
    .signup-prompt {
        margin: 1rem 0;
        padding: 1.25rem;
    }

    .signup-prompt-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .signup-prompt-yes,
    .signup-prompt-no {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .signup-prompt {
        margin: 0.75rem 0;
        padding: 1rem;
    }

    .signup-prompt-title {
        font-size: 1rem;
    }

    .signup-prompt-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

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

/* Miigo+ Upgrade Modal */
.miigo-plus-modal {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 32px 80px rgba(255, 215, 0, 0.3);
    padding: 2.5rem;
    width: 100%;
    max-width: 520px;
    margin: 1rem;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.show .miigo-plus-modal {
    transform: scale(1) translateY(0);
}

.miigo-plus-content {
    text-align: center;
}

.miigo-plus-pitch {
    margin-bottom: 2rem;
}

.miigo-plus-pitch p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #6e6e73;
    margin: 0;
}

.miigo-plus-benefits {
    margin-bottom: 2.5rem;
    text-align: left;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateY(-1px);
}

.benefit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.benefit-text h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1d1d1f;
}

.benefit-text p {
    margin: 0;
    font-size: 0.875rem;
    color: #6e6e73;
    line-height: 1.4;
}

.pricing-options {
    margin-bottom: 2rem;
}

.pricing-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
    gap: 4px;
}

.pricing-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6e6e73;
    position: relative;
}

.pricing-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1d1d1f;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.save-badge {
    display: inline-block;
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    margin-left: 0.25rem;
    position: absolute;
    top: -8px;
    right: -4px;
    box-shadow: 0 2px 6px rgba(52, 199, 89, 0.3);
}

.pricing-display {
    margin-bottom: 1rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.price-period {
    font-size: 1rem;
    color: #6e6e73;
    margin-top: 0.25rem;
}

.upgrade-actions {
    text-align: center;
}

.upgrade-now-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1d1d1f;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
    width: 100%;
    margin-bottom: 1rem;
}

.upgrade-now-btn:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.5);
}

.upgrade-note {
    font-size: 0.8rem;
    color: #8e8e93;
    margin: 0;
    line-height: 1.4;
}

/* Mobile responsive for Miigo+ modal */
@media (max-width: 768px) {
    .miigo-plus-modal {
        padding: 2rem;
        margin: 0.5rem;
        max-width: none;
        width: calc(100% - 1rem);
    }

    .benefit-item {
        padding: 0.875rem;
    }

    .benefit-icon {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }

    .price-amount {
        font-size: 2rem;
    }

    .pricing-btn {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }

    .save-badge {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .miigo-plus-modal {
        padding: 1.5rem;
    }

    .miigo-plus-pitch p {
        font-size: 1rem;
    }

    .benefit-item {
        margin-bottom: 1rem;
        padding: 0.75rem;
    }

    .upgrade-now-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

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

/* Section Header with Back Arrow */
.section-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.back-arrow {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.back-arrow:hover {
    color: #B7C6B1;
}

/* Goals & Plan Section */
.goals-plan-section {
    max-width: 100%;
}

.goals-description {
    margin-bottom: 24px;
}

.goals-description p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.goals-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #B7C6B1;
}

.form-group textarea::placeholder {
    color: #999;
    font-style: italic;
}

.goals-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.save-goals-btn {
    background: #B7C6B1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-goals-btn:hover {
    background: #a5b49f;
    transform: translateY(-1px);
}

.last-updated {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Reminders Section */
.reminders-section {
    max-width: 100%;
}

.reminders-description {
    margin-bottom: 24px;
}

.reminders-description p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.reminder-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e5e5e5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group input, .form-group select {
    padding: 10px 12px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #B7C6B1;
}

.add-reminder-btn, .test-reminder-btn {
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
    margin-right: 10px;
}

.add-reminder-btn {
    background: #B7C6B1;
}

.add-reminder-btn:hover {
    background: #a5b49f;
    transform: translateY(-1px);
}

.test-reminder-btn {
    background: #6c757d;
}

.test-reminder-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.reminder-item:hover {
    border-color: #B7C6B1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reminder-content {
    flex: 1;
}

.reminder-label {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    font-size: 15px;
}

.reminder-details {
    display: flex;
    gap: 12px;
    align-items: center;
}

.reminder-time {
    color: #B7C6B1;
    font-weight: 600;
    font-size: 14px;
}

.reminder-repeat {
    background: #f1f3f4;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.reminder-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.edit-reminder-btn, .delete-reminder-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-reminder-btn:hover {
    background: #f0f8ff;
    color: #0066cc;
}

.delete-reminder-btn:hover {
    background: #fff5f5;
    color: #dc3545;
}

.save-reminder-btn {
    background: #B7C6B1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.save-reminder-btn:hover {
    background: #a5b49f;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .reminder-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

.back-arrow svg {
    transition: transform 0.2s ease;
}

.back-arrow:hover svg {
    transform: translateX(-2px);
}

/* Memory Display in Profile */
.memory-section {
    margin-top: 24px;
}

.memory-category-group {
    margin-bottom: 20px;
}

.memory-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e5e5;
    text-transform: capitalize;
}

.memory-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    font-size: 14px;
}

.memory-value {
    color: #1a1a1a;
    font-weight: 500;
}

.memory-source {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}

.empty-memories {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Miigo+ Upgrade Banner (Account Section) */
.miigo-plus-upgrade-banner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.miigo-plus-upgrade-banner:hover {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
}

.upgrade-banner-content {
    flex: 1;
}

.upgrade-text {
    font-size: 0.9rem;
    color: #1d1d1f;
    font-weight: 500;
    line-height: 1.4;
}

.upgrade-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1d1d1f;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* Miigo+ Member Badge */
.miigo-plus-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1d1d1f;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.plus-star {
    width: 12px;
    height: 12px;
    fill: currentColor;
    stroke: none;
}

/* Miigo+ Chat Banner (Under Input) */
.miigo-plus-chat-banner {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    margin: 0 2rem 1rem 2rem;
    padding: 0.875rem 1.25rem;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.15);
    animation: slideInUp 0.4s ease-out;
}

.chat-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.chat-banner-text {
    font-size: 0.875rem;
    color: #1d1d1f;
    font-weight: 500;
    flex: 1;
}

.chat-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upgrade-btn-small {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1d1d1f;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.25);
}

.upgrade-btn-small:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.35);
}

.dismiss-banner {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dismiss-banner:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

/* Mobile responsive for Miigo+ elements */
@media (max-width: 768px) {
    .miigo-plus-upgrade-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.75rem;
    }

    .upgrade-btn {
        width: 100%;
    }

    .miigo-plus-chat-banner {
        margin: 0 1rem 1rem 1rem;
        padding: 0.75rem 1rem;
    }

    .chat-banner-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .chat-banner-actions {
        justify-content: center;
        width: 100%;
    }

    .upgrade-btn-small {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .miigo-plus-upgrade-banner {
        padding: 0.875rem;
    }

    .upgrade-text {
        font-size: 0.85rem;
    }

    .miigo-plus-chat-banner {
        margin: 0 0.5rem 0.75rem 0.5rem;
        padding: 0.625rem 0.875rem;
    }

    .chat-banner-text {
        font-size: 0.8rem;
    }

    .upgrade-btn-small {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
}

/* Mobile responsive design */
@media (max-width: 768px) {
    .container {
        padding: calc(64px + 0.25rem) 0.5rem 0.5rem;
        height: 100vh;
    }

    .main {
        gap: 0.5rem;
    }

    .chat-messages {
        padding: 0.75rem 0.5rem;
        padding-right: 1rem;
        max-height: calc(100vh - 150px);
    }

    .navbar-content {
        padding: 0 1rem;
        height: 100%;
    }

    .navbar-logo {
        font-size: 1.5rem;
    }

    .message-content {
        max-width: 85%;
        padding: 1rem 1.25rem;
        border-radius: 20px;
    }

    .input-container {
        padding: 1rem;
        gap: 0.75rem;
    }

    .mic-button {
        width: 40px;
        height: 40px;
    }

    .mic-button.recording {
        width: 40px !important;
        height: 40px !important;
    }

    .message-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .container {
        padding: calc(64px + 0.1rem) 0.25rem 0.25rem;
    }

    .chat-messages {
        padding: 0.5rem 0.25rem;
        padding-right: 0.75rem;
        max-height: calc(100vh - 130px);
    }

    .message-content {
        max-width: 90%;
        padding: 0.875rem 1rem;
        border-radius: 18px;
        font-size: 15px;
    }

    .input-container {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .mic-button {
        width: 40px;
        height: 40px;
    }

    .send-button-icon {
        width: 40px;
        height: 40px;
    }
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Onboarding Modal */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-overlay.show {
    opacity: 1;
    visibility: visible;
}

.onboarding-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    width: 100%;
    max-width: 520px;
    margin: 1rem;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.onboarding-overlay.show .onboarding-modal {
    transform: scale(1) translateY(0);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.onboarding-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.progress-bar {
    width: 200px;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.875rem;
    color: #6e6e73;
    font-weight: 500;
    white-space: nowrap;
}

.skip-button {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #6e6e73;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skip-button:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
    color: #1d1d1f;
}

.onboarding-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 2rem;
    min-height: 300px;
}

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.onboarding-back {
    background: none;
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #6e6e73;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.onboarding-back:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.onboarding-next {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.011em;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
}

.onboarding-next:hover {
    background: linear-gradient(135deg, #0051d5 0%, #003db3 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.onboarding-next:active {
    transform: translateY(0);
}

.onboarding-step {
    text-align: center;
    padding: 1rem 0;
}

.onboarding-step h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.03em;
}

.onboarding-step p {
    font-size: 1.125rem;
    color: #6e6e73;
    margin: 0 0 2rem 0;
    line-height: 1.5;
}

.mood-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.mood-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mood-button:hover {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mood-button.selected {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

.mood-emoji {
    font-size: 2rem;
}

.mood-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
}

.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.choice-button {
    padding: 1rem 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    color: #1d1d1f;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.choice-button:hover {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.choice-button.selected {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    font-weight: 500;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

.onboarding-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.onboarding-input:focus {
    outline: none;
    border-color: #007aff;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.onboarding-input::placeholder {
    color: #6e6e73;
}

.checkin-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkin-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.checkin-option:hover {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.checkin-option.selected {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2);
}

.checkin-icon {
    font-size: 2rem;
}

.checkin-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.3;
}

.consent-toggle-group {
    background: rgba(0, 122, 255, 0.05);
    border: 1px solid rgba(0, 122, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.consent-toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.consent-toggle-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
}

/* Mobile Menu */
        .mobile-menu-icon {
            position: fixed;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            color: #1d1d1f;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 50%;
            transition: background-color 0.3s ease;
            z-index: 1003;
            display: none;
        }

        .mobile-menu-icon:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        /* Mobile Menu Dropdown */
        .mobile-menu-dropdown {
            position: fixed;
            top: 100%;
            left: 0;
            right: 0;
            width: 100vw;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1002;
            display: none;
        }

        .mobile-menu-dropdown.show {
            display: block;
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .mobile-menu-content {
            padding: 2rem;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .mobile-nav-link {
            display: block;
            font-size: 1.25rem;
            color: #1d1d1f;
            text-decoration: none;
            transition: color 0.2s ease;
            padding: 0.75rem 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        .mobile-nav-link:hover {
            color: #007aff;
        }

        .mobile-auth-buttons {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        @media (max-width: 768px) {
            .mobile-menu-icon {
                display: block;
            }
        }