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

html, body {
    height: 100%;
    overflow: hidden; /* Prevent body scrolling */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    background: linear-gradient(135deg, #f9f9f9 0%, #ececec 50%, #f9f9f9 100%);
    background-attachment: fixed;
    color: #1e293b;
    line-height: 1.6;
    font-size: 14px;
    font-weight: 400;
}

/* App Container - Full viewport height */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Fixed Header */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    color: #1e293b;
    padding: 1rem 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Authentication UI */
.auth-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.auth-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}

.user-plan {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: capitalize;
}

.user-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 150px;
    z-index: 1000;
}

.user-profile:hover .user-menu {
    display: block;
}

.user-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.user-menu button:hover {
    background: #f1f5f9;
}

.upgrade-btn {
    color: #3b82f6;
    font-weight: 500;
}

.manage-btn {
    color: #64748b;
}

.logout-btn {
    color: #dc2626;
}

.usage-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 300px;
}

@media (max-width: 768px) {
    .usage-info {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        max-width: 280px;
        white-space: normal;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .usage-info {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        max-width: 250px;
    }
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #0f172a;
}

/* Status indicator in transcript card */
.transcript-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: #475569;
    z-index: 1;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Status: Ready/Authenticated - Green (positive) */
.status-ready,
.status-authenticated,
.transcript-status.status-ready,
.transcript-status.status-authenticated {
    color: #059669;
    background: rgba(34, 197, 94, 0.15);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

/* Status: Connected/Recording - Blue (active) */
.status-connected,
.transcript-status.status-connected {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Status: Connecting - Purple (in progress) */
.status-connecting,
.transcript-status.status-connecting {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.15);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

/* Status: Disconnected - Orange (warning) */
.status-disconnected,
.transcript-status.status-disconnected {
    color: #d97706;
    background: rgba(251, 191, 36, 0.15);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

/* Status: Error - Red (danger) */
.status-error,
.transcript-status.status-error {
    color: #dc2626;
    background: rgba(248, 113, 113, 0.15);
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.2);
}

/* Status: Unauthenticated - Gray (neutral) */
.status-unauthenticated,
.transcript-status.status-unauthenticated {
    color: #6b7280;
    background: rgba(156, 163, 175, 0.15);
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.2);
}

/* Status: Limited - Yellow (caution) */
.status-limited,
.transcript-status.status-limited {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* Main Content Area - Takes remaining space */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0; /* Allow flex children to shrink */
    position: relative; /* For floating buttons */
}

/* Answer Section - 2/3 of main area */
.answer-section {
    flex: 2;
    /* background: rgba(255, 255, 255, 0.8); */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 0.75rem 0.75rem 0.75rem 0.5rem;
    /* border-radius: 24px; */
    border: 1px solid rgba(226, 232, 240, 0.6);
    /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    transition: all 0.3s ease;
}


.section-header {
    background: rgba(248, 250, 252, 0.6);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: -0.025em;
}

.generate-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.generate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.generate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.answer-scroll-area {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.7;
}

.answer-scroll-area p {
    margin: 0 0 1.25rem 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
}

.answer-scroll-area .placeholder {
    color: #94a3b8;
    text-align: center;
    font-style: italic;
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

/* Removed complex generating state indicators */

/* Markdown content styling */
.markdown-content {
    line-height: 1.8;
    font-size: 0.95rem;
    color: #334155;
    padding: 0.5rem 0;
    max-width: none;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin: 2rem 0 1rem 0;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.025em;
    position: relative;
}

.markdown-content h1 {
    font-size: 1.5rem;
    border-bottom: 3px solid #f97316;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.markdown-content h2 {
    font-size: 1.25rem;
    position: relative;
    padding-left: 1rem;
}

.markdown-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.125rem;
    bottom: 0.125rem;
    width: 4px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 2px;
}

.markdown-content h3 {
    font-size: 1.125rem;
    color: #475569;
    position: relative;
    padding-left: 0.75rem;
}

.markdown-content h3::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #f97316;
    font-weight: bold;
}

.markdown-content p {
    margin: 1.25rem 0;
    color: #475569;
    line-height: 1.8;
    text-align: justify;
    hyphens: auto;
}

.markdown-content p:first-of-type {
    margin-top: 0;
}

.markdown-content p:last-of-type {
    margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
    margin: 1.5rem 0;
    padding-left: 0;
    position: relative;
}

.markdown-content ul {
    list-style: none;
}

.markdown-content ul li {
    position: relative;
    padding-left: 1.75rem;
    margin: 0.75rem 0;
}

.markdown-content ul li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: #f97316;
    font-weight: bold;
    font-size: 1.2em;
}

.markdown-content ol {
    counter-reset: list-counter;
    padding-left: 0;
}

.markdown-content ol li {
    position: relative;
    padding-left: 2rem;
    margin: 0.75rem 0;
    counter-increment: list-counter;
}

.markdown-content ol li::before {
    content: counter(list-counter) '.';
    position: absolute;
    left: 0;
    top: 0;
    color: #f97316;
    font-weight: 700;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.markdown-content li {
    color: #475569;
    line-height: 1.7;
}

.markdown-content code {
    background: #f6f8fa;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    color: #d1242f;
    border: 1px solid #d1d9e0;
    font-weight: 500;
    letter-spacing: 0.025em;
}


.markdown-content pre {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Language title bar */
.markdown-content pre::before {
    content: attr(data-language);
    display: flex;
    align-items: center;
    background: #f8fafc;
    color: #64748b;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

/* Copy button */
.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 10;
}

.code-copy-btn::before {
    content: '';
    width: 14px;
    height: 14px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184' /%3e%3c/svg%3e") no-repeat;
    mask-size: contain;
    -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184' /%3e%3c/svg%3e") no-repeat;
    -webkit-mask-size: contain;
}

.code-copy-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.code-copy-btn:active {
    background: #f3f4f6;
}

.code-copy-btn.copied {
    background: #dcfce7;
    border-color: #16a34a;
    color: #16a34a;
}

.code-copy-btn.copied::before {
    mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='m4.5 12.75 6 6 9-13.5' /%3e%3c/svg%3e") no-repeat;
    mask-size: contain;
    -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='m4.5 12.75 6 6 9-13.5' /%3e%3c/svg%3e") no-repeat;
    -webkit-mask-size: contain;
}

/* Code content area */
.markdown-content pre code {
    display: block;
    padding: 1.25rem 1rem;
    overflow-x: auto;
    background: none;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #1e293b;
    white-space: pre;
    tab-size: 2;
}



/* VSCode Light Theme Syntax Highlighting */
.markdown-content pre .hljs-keyword,
.markdown-content pre .hljs-built_in {
    color: #0000ff;
    font-weight: normal;
}

.markdown-content pre .hljs-string {
    color: #a31515;
}

.markdown-content pre .hljs-comment {
    color: #008000;
    font-style: italic;
}

.markdown-content pre .hljs-number,
.markdown-content pre .hljs-literal {
    color: #098658;
}

.markdown-content pre .hljs-title.function,
.markdown-content pre .hljs-title.class,
.markdown-content pre .hljs-title {
    color: #795e26;
}

.markdown-content pre .hljs-variable,
.markdown-content pre .hljs-name {
    color: #001080;
}

.markdown-content pre .hljs-type {
    color: #267f99;
}

.markdown-content pre .hljs-operator,
.markdown-content pre .hljs-punctuation {
    color: #000000;
}

.markdown-content pre .hljs-tag {
    color: #800000;
}

.markdown-content pre .hljs-attribute,
.markdown-content pre .hljs-attr {
    color: #ff0000;
}

.markdown-content pre .hljs-doctag,
.markdown-content pre .hljs-meta {
    color: #0000ff;
}

.markdown-content pre .hljs-params {
    color: #001080;
}

.markdown-content pre .hljs-section {
    color: #0000ff;
    font-weight: bold;
}

.markdown-content blockquote {
    border-left: 4px solid #f97316;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(234, 88, 12, 0.05) 100%);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    position: relative;
    color: #9a3412;
    font-style: italic;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

.markdown-content blockquote::before {
    content: '“';
    position: absolute;
    top: -0.25rem;
    left: 1rem;
    font-size: 3rem;
    color: rgba(249, 115, 22, 0.3);
    font-family: Georgia, serif;
    line-height: 1;
}

.markdown-content blockquote p {
    margin: 0.5rem 0;
    padding-left: 1rem;
}

.markdown-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
}

.markdown-content th,
.markdown-content td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.markdown-content th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 700;
    color: #334155;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 2px solid #f97316;
}

.markdown-content td {
    color: #475569;
    font-size: 0.9rem;
}

.markdown-content tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.5);
}

.markdown-content tr:hover td {
    background: rgba(249, 115, 22, 0.05);
}

/* Math formula styling */
.MathJax {
    font-size: 1rem !important;
    color: #ea580c !important;
}

/* Enhanced markdown elements */
.markdown-content strong {
    color: #f97316;
    font-weight: 700;
}

.markdown-content em {
    color: #475569;
    font-style: italic;
    position: relative;
}

.markdown-content em::before,
.markdown-content em::after {
    content: '';
    position: absolute;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #f97316 50%, transparent 100%);
    width: 100%;
    left: 0;
}

.markdown-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #f97316 50%, transparent 100%);
    margin: 2.5rem 0;
    border-radius: 1px;
}

/* Special content blocks */
.markdown-content .highlight {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    position: relative;
}

.markdown-content .highlight::before {
    content: '⚡';
    position: absolute;
    top: 1rem;
    left: -0.5rem;
    background: #f59e0b;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Enhanced streaming text indicators */
.streaming-cursor::after {
    content: '▊';
    color: #f97316;
    animation: blink 1s infinite;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Waiting for response indicator */
.waiting-response {
    color: #64748b;
    font-style: italic;
    position: relative;
}

.waiting-response::after {
    content: '⋯';
    color: #10b981;
    animation: waiting-dots 1.5s infinite;
    margin-left: 4px;
    font-weight: bold;
}

@keyframes waiting-dots {
    0%, 33% { content: '⋯'; }
    34%, 66% { content: '⋯⋯'; }
    67%, 100% { content: '⋯⋯⋯'; }
}

/* Simplified status text */
.status-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Transcript Section - 1/3 of main area */
.transcript-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 0.75rem 0.5rem 0.75rem 0.75rem;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    transition: all 0.3s ease;
    position: relative;
}


.transcript-scroll-area {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    min-height: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
    color: #334155;
}

.transcript-scroll-area .placeholder {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    margin: 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

/* Speaker bubble styles */
.speaker-bubble {
    margin: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.speaker-bubble.interviewer {
    justify-content: flex-start;
}

.speaker-bubble.interviewee {
    justify-content: flex-end;
}

.bubble-content {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.6;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.interviewer .bubble-content {
    background: rgba(248, 250, 252, 0.9);
    color: #334155;
    border-bottom-left-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.interviewee .bubble-content {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-bottom-right-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.speaker-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    opacity: 0.7;
}

.interviewer .speaker-label {
    color: #64748b;
}

.interviewee .speaker-label {
    color: #3b82f6;
    text-align: right;
}

.partial-text {
    font-style: italic;
    opacity: 0.8;
}

.interviewee .partial-text {
    color: #60a5fa;
}

.interviewer .partial-text {
    color: #94a3b8;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.status-connected,
.transcript-status.status-connected {
    animation: none;
}

.status-connected::before,
.transcript-status.status-connected::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #2563eb;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: recordingPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
}

@keyframes recordingPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Floating Action Buttons */
.floating-buttons {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.floating-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.025em;
}

.floating-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.floating-btn.generate {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.floating-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.floating-btn.generate:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.floating-btn:hover:not(:disabled) {
    opacity: 0.95;
}

.floating-btn:disabled {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.floating-btn:disabled:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Header Buttons */
.stop-btn, .clear-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stop-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3), 0 2px 4px -1px rgba(239, 68, 68, 0.06);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stop-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Clear button in transcript card */
.transcript-clear-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(248, 250, 252, 0.95);
    color: #475569;
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transcript-clear-btn:hover {
    background: rgba(226, 232, 240, 0.95);
    color: #334155;
    border-color: rgba(148, 163, 184, 0.8);
}

.stop-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 400px;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #1f2937;
}

#auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#jwt-token {
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

/* Authentication buttons */
.auth-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.retry-btn, .manual-btn {
    flex: 1;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.manual-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.manual-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

#auth-form button {
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

#auth-form button[type="submit"] {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.cancel-btn {
    background: #f87171 !important;
    color: white !important;
}

.cancel-btn:hover {
    background: #ef4444 !important;
    transform: translateY(-1px);
}

.hidden {
    display: none !important;
}

/* Loading Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.overlay.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.overlay p {
    font-size: 1.125rem;
    color: #374151;
    font-weight: 500;
}

/* Desktop layout - when width > height (landscape/desktop) */
@media (min-width: 769px) and (orientation: landscape) {
    .app-main {
        flex-direction: row;
    }
    
    .transcript-section {
        flex: 1; /* 1/3 of the space */
        margin: 0.5rem 0.25rem 0.5rem 0.5rem;
    }
    
    .answer-section {
        flex: 2; /* 2/3 of the space */
        margin: 0.5rem 0.5rem 0.5rem 0.25rem;
    }
    
    .floating-buttons {
        left: 66.67%; /* Position over the answer section (2/3 from left) */
        transform: translateX(-50%);
    }
}

/* For larger desktop screens */
@media (min-width: 1024px) {
    .app-main {
        flex-direction: row;
    }
    
    .transcript-section {
        flex: 1; /* 1/3 of the space */
        margin: 0.5rem 0.25rem 0.5rem 0.5rem;
    }
    
    .answer-section {
        flex: 2; /* 2/3 of the space */
        margin: 0.5rem 0.5rem 0.5rem 0.25rem;
    }
    
    .floating-buttons {
        left: 66.67%; /* Position over the answer section (2/3 from left) */
        transform: translateX(-50%);
    }
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .app-header {
        padding: 0.5rem 1rem;
    }
    
    .app-header h1 {
        font-size: 1.125rem;
    }
    
    .section-header {
        padding: 0.5rem 0.75rem;
    }
    
    .section-header h2 {
        font-size: 0.875rem;
    }
    
    .generate-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8125rem;
    }
    
    .answer-scroll-area,
    .transcript-scroll-area {
        padding: 0.75rem;
    }
    
    .floating-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .stop-btn, .clear-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8125rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .app-header {
        padding: 0.5rem 0.75rem;
    }
    
    .app-header h1 {
        font-size: 1rem;
    }
    
    .transcript-status {
        font-size: 0.6875rem;
        padding: 0.375rem 0.75rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .answer-section {
        margin: 0.25rem;
    }
    
    .transcript-section {
        margin: 0.25rem;
    }
    
    .section-header {
        padding: 0.5rem;
    }
    
    .answer-scroll-area,
    .transcript-scroll-area {
        padding: 0.5rem;
    }
    
    .floating-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.8125rem;
    }
    
    .floating-buttons {
        bottom: 1rem;
    }
    
    .stop-btn, .clear-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Authentication Modal Styles */
/* Authentication Modal Styles - Professional Design */
.auth-modal-content {
    max-width: 480px;
    padding: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.auth-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.auth-header h2 {
    margin: 0;
    color: #111827;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
}

.auth-providers {
    padding: 1.5rem 2rem;
}

.primary-providers {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.secondary-providers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.oauth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.oauth-btn:hover::before {
    left: 100%;
}

.oauth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.oauth-btn span {
    white-space: nowrap;
}

/* Provider-specific styling */
.google-btn:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
}

.github-btn {
    color: #24292e;
}

.github-btn:hover {
    border-color: #24292e;
    background: #f6f8fa;
    box-shadow: 0 4px 12px rgba(36, 41, 46, 0.15);
}

.azure-btn {
    color: #0078d4;
}

.azure-btn:hover {
    border-color: #0078d4;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.2);
}

.facebook-btn {
    color: #1877f2;
}

.facebook-btn:hover {
    border-color: #1877f2;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.2);
}

.twitter-btn {
    color: #1da1f2;
}

.twitter-btn:hover {
    border-color: #1da1f2;
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.2);
}

.phone-btn {
    color: #059669;
}

.phone-btn:hover {
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.solana-btn {
    color: #9945ff;
}

.solana-btn:hover {
    border-color: #9945ff;
    box-shadow: 0 4px 12px rgba(153, 69, 255, 0.2);
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 2rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}

.divider span {
    padding: 0 1.5rem;
    background: white;
}

.email-form {
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder {
    color: #9ca3af;
}

.submit-btn {
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.auth-footer {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid #f3f4f6;
}

.toggle-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    margin-bottom: 1rem;
}

.toggle-btn:hover {
    color: #2563eb;
}

.auth-help {
    margin-top: 1rem;
}

.help-link {
    color: #6b7280;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s;
}

.help-link:hover {
    color: #374151;
}

/* Mobile Responsiveness for Authentication Modal */
@media (max-width: 768px) {
    .auth-modal-content {
        max-width: 95vw;
        margin: 1rem;
        border-radius: 12px;
    }
    
    .auth-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
    }
    
    .auth-providers {
        padding: 1rem 1.5rem;
    }
    
    .secondary-providers {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .oauth-btn {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .oauth-btn span {
        font-size: 0.875rem;
    }
    
    .divider {
        margin: 1rem 1.5rem;
    }
    
    .email-form {
        padding: 0 1.5rem;
    }
    
    .auth-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-modal-content {
        margin: 0.5rem;
        border-radius: 8px;
    }
    
    .auth-header {
        padding: 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.25rem;
    }
    
    .auth-subtitle {
        font-size: 0.8rem;
    }
    
    .auth-providers {
        padding: 0.75rem 1rem;
    }
    
    .oauth-btn {
        padding: 0.875rem 0.75rem;
        font-size: 0.8rem;
        gap: 0.5rem;
    }
    
    .oauth-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .divider {
        margin: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .email-form {
        padding: 0 1rem;
    }
    
    .input-group input {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
    
    .submit-btn {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
    
    .auth-footer {
        padding: 0.75rem 1rem 1rem;
    }
    
    .toggle-btn {
        font-size: 0.8rem;
    }
    
    .help-link {
        font-size: 0.75rem;
    }
}

/* Upgrade Modal Styles - Clean White/Gray Theme */
.upgrade-modal-content {
    max-width: 800px;
    padding: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #1f2937;
}

.modal-header {
    padding: 1.5rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 400;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.plan-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.plan-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.plan-card.popular {
    border-color: #3b82f6;
    box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.1);
}

.plan-card.current {
    background: #f9fafb;
    border-color: #d1d5db;
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.plan-header {
    margin-bottom: 1.5rem;
}

.plan-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    color: #3b82f6;
    margin: 0;
    line-height: 1;
}

.price span {
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
}

.plan-features {
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 0;
    text-align: left;
}

.plan-features li {
    padding: 0.5rem 0;
    color: #4b5563;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1.4;
}

.feature-icon {
    color: #10b981;
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.plan-button {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-button:not([disabled]) {
    background: #3b82f6;
    color: white;
}

.plan-button:not([disabled]):hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.plan-button.current-plan {
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
}

.plan-button.downgrade {
    background: #dc2626;
    color: white;
}

.plan-button.downgrade:hover {
    background: #b91c1c;
}

.modal-footer {
    padding: 1rem 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.plan-note {
    margin: 0;
    color: #6b7280;
    font-size: 0.8rem;
}

/* Mobile Responsiveness for Upgrade Modal */
@media (max-width: 768px) {
    .upgrade-modal-content {
        max-width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .plan-card {
        padding: 1.25rem;
    }
    
    .plan-card.popular {
        box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.1);
    }
    
    .plan-card h3 {
        font-size: 1.25rem;
    }
    
    .price {
        font-size: 1.75rem;
    }
    
    .plan-features li {
        font-size: 0.8rem;
        padding: 0.375rem 0;
    }
    
    .modal-footer {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .upgrade-modal-content {
        border-radius: 8px;
        margin: 0.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-subtitle {
        font-size: 0.8rem;
    }
    
    .plan-card {
        padding: 1rem;
    }
    
    .plan-card h3 {
        font-size: 1.125rem;
    }
    
    .price {
        font-size: 1.5rem;
    }
    
    .plan-features li {
        font-size: 0.75rem;
    }
    
    .plan-button {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

/* Modal close button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Light theme close button for upgrade modal */
.upgrade-modal-content .modal-close {
    color: #6b7280;
}

.upgrade-modal-content .modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Downgrade/Cancel Modal Styles */
.downgrade-modal-content {
    max-width: 500px;
    padding: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #1f2937;
}

.downgrade-header {
    padding: 1.5rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.downgrade-header h2 {
    margin: 0;
    color: #dc2626;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.downgrade-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.downgrade-details {
    padding: 1.5rem 2rem;
}

.plan-change-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.current-plan-info, .new-plan-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.plan-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
}

.plan-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.arrow {
    font-size: 1.25rem;
    color: #6b7280;
    font-weight: bold;
}

.change-effects h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.change-effects ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.change-effects li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.change-effects li::before {
    content: '•';
    color: #dc2626;
    font-weight: bold;
}

.billing-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 8px;
    border: 1px solid #fcd34d;
}

.billing-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #92400e;
    text-align: center;
}

.downgrade-actions {
    padding: 1rem 2rem 1.5rem;
    display: flex;
    gap: 1rem;
    border-top: 1px solid #e5e7eb;
}

.confirm-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.cancel-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: #e5e7eb;
}

@media (max-width: 768px) {
    .downgrade-modal-content {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .downgrade-header {
        padding: 1rem;
    }
    
    .downgrade-details {
        padding: 1rem;
    }
    
    .plan-change-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
    
    .downgrade-actions {
        padding: 1rem;
        flex-direction: column;
    }
}

/* Error and Success Messages */
.error-message, .success-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: none;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.success-message {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Payment Methods Info */
.payment-methods-info {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.payment-methods-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.payment-methods-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.payment-method {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.payment-security {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Regional payment method specific styles */
.payment-method.alipay {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: white;
    border: none;
}

.payment-method.wechat {
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    color: white;
    border: none;
}

.payment-method.apple-pay {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    border: none;
}

.payment-method.google-pay {
    background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);
    color: white;
    border: none;
}

/* Responsive payment methods */
@media (max-width: 640px) {
    .payment-methods-list {
        gap: 0.5rem;
    }
    
    .payment-method {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}