html, body {
    height: auto;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 20px 20px 0 20px; /* Remove bottom padding to eliminate gap */
    background-color: #f5f5f5;
}


.container {
    display: flex;
    margin: 0 84px 0 0; /* Add 64px right gap + 20px margin for symmetry with left side nav */
    gap: 20px;
    height: calc(100vh - 40px); /* Full height minus top padding only */
    position: relative;
    width: calc(100vw - 64px - 64px - 40px); /* Full viewport width minus left nav, right gap, and margins */
}

.left-column {
    width: 300px;
    min-width: 300px; /* Prevent shrinking */
    flex-shrink: 0; /* Prevent shrinking */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.recording-controls-wrapper {
    margin-top: auto; /* Push to bottom */
    margin-bottom: 8px; /* Just a tiny gap from bottom */
}

.queries-panel {
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* Allow flexbox to shrink this */
    margin-bottom: 20px; /* Add proper gap between topics and recording controls */
}

.results-panel {
    flex: 1 1 auto;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    box-shadow: none;
    min-height: 0;
    height: 100%;
}

.results-container {
    background-color: #bcbcbc;
    border: 1px solid #999;
    border-radius: 4px;
    padding: 10px;
    min-height: 120px;
    height: calc(100% - 80px);
    overflow-y: auto;
    margin-top: 10px;
}

#queriesContainer {
    margin-top: 10px;
    height: calc(100% - 40px); /* Height minus header */
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.section {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.query-item {
    cursor: pointer;
    padding: 10px 12px;
    margin-bottom: 0;
    border-radius: 0;
    background-color: white;
    font-size: 14px;
    position: relative;
    border: none;
    border-bottom: 1px solid #eaeaea;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.query-item:last-child {
    border-bottom: none;
}

.query-item .timestamp {
    color: #999;
    font-size: 12px;
    display: block;
    margin-bottom: 2px;
}

.query-content {
    display: flex;
    align-items: center;
    padding-right: 40px; /* Reserve space for the execute-all-btn */
}

.query-item-icons {
    display: flex;
    margin-right: 8px;
    gap: 4px;
}

/* Icon layout configurations based on count */
.query-item-icons.icon-count-1 {
    display: flex;
    align-items: center;
}

.query-item-icons.icon-count-2 {
    display: flex;
    align-items: center;
    gap: 4px;
}

.query-item-icons.icon-count-3,
.query-item-icons.icon-count-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    width: 42px;
    height: 42px;
}

.query-item-icons.icon-count-3 .query-icon:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.query-item-icons.icon-count-3 .query-icon:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.query-item-icons.icon-count-3 .query-icon:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

.query-item-icons.icon-count-4 .query-icon:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.query-item-icons.icon-count-4 .query-icon:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.query-item-icons.icon-count-4 .query-icon:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

.query-item-icons.icon-count-4 .query-icon:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
}

.query-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c6bff;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.1s;
}

.query-icon.clickable:hover {
    background-color: #edeaff;
    transform: scale(1.1);
}

.query-icon.clickable:active {
    transform: scale(0.95);
}

.query-icon svg {
    width: 16px;
    height: 16px;
}

.query-text {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    word-wrap: break-word;
}

.query-item:hover {
    background-color: #f8f8f8;
}

.query-item:active {
    background-color: #f0f0f0;
}

/* Execute all intentions button */
.query-item .execute-all-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 14px;
    opacity: 0.7;
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s, transform 0.1s;
    z-index: 10;
    background: none;
    border: none;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.query-item .execute-all-btn:hover {
    color: #7c6bff;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.query-item .execute-all-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.query-item .execute-all-btn:disabled {
    cursor: default;
    opacity: 0.4;
}

/* All complete state - when all query types already exist */
.query-item .execute-all-btn.all-complete {
    color: #28a745;
    opacity: 0.6;
    cursor: default;
    transition: opacity 0.3s ease-out, transform 0.1s;
}

.query-item .execute-all-btn.all-complete:hover {
    color: #28a745;
    opacity: 0.6;
    transform: translateY(-50%);
}

/* Fade out animation */
.query-item .execute-all-btn.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

/* Style specifically for the Queries panel header */
.queries-panel h2 {
    color: #7c6bff;
    font-weight: 600;
}

.expand-collapse-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    margin-left: 5px;
}

.expand-collapse-icon:hover {
    color: #333;
}

/* External Link Button Styling */
.external-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    margin-left: auto;
    margin-right: 5px;
}

.external-link-button:hover {
    color: #007bff;
}

/* Bookmark Button Styling */
.bookmark-button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    margin-right: 5px;
    cursor: pointer;
}

.bookmark-button:hover {
    color: #7c6bff;
}

.bookmark-button.bookmarked {
    color: #7c6bff;
}

.bookmark-button.bookmarked:hover {
    color: #5D4FEB;
}

.result-card {
    background-color: white;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: none;
    overflow: visible;
}

.result-card-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: none;
    cursor: pointer;
}

.result-card-header .icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    color: #7c6bff;
}

.result-card-header .title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    word-wrap: break-word;
}

.result-card-content {
    padding: 0 20px 16px 20px;
    display: block;
}

.result-card.expanded .result-card-content {
    display: block;
}

.result-card:not(.expanded) .result-card-content {
    display: none;
}

button {
    background-color: #5D4FEB; /* Purple color matching the logo */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #4D3FD7; /* Slightly darker shade for hover state */
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

button.stop {
    background-color: #dc3545;
}

button.stop:hover {
    background-color: #bd2130;
}

/* Recording Controls Styling */
.recording-controls {
    position: static;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.recording-status {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    order: 2;
}

.recording-indicator {
    display: none;
}

.recording-dot {
    width: 10px;
    height: 10px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.recording-indicator.paused .recording-dot {
    animation: none;
    background-color: #f59e0b;
}

.recording-indicator.finished .recording-dot {
    animation: none;
    background-color: #10b981;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.recording-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.4px;
}

.recording-timer {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    min-width: 55px;
    white-space: nowrap;
}

.recording-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    order: 3;
}

/* Add responsive behavior for very small screens */
@media (max-width: 600px) {
    .recording-controls {
        gap: 8px;
        padding: 8px 12px;
    }
    
    .recording-timer {
        font-size: 16px;
        min-width: 50px;
    }
    
    .recording-buttons {
        gap: 6px;
    }
    
    .recording-btn {
        width: 40px;
        height: 40px;
    }
    
    .recording-btn .btn-icon {
        width: 18px;
        height: 18px;
    }
    
    .recording-limits {
        gap: 4px;
        padding: 4px 6px;
    }
    
    .recording-limits #remaining-time-display {
        font-size: 10px;
    }
    
    .recording-limits .limits-label {
        font-size: 8px;
    }
}

/* Recording Limits Display */
.recording-limits {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
    order: 1;
}

.recording-limits .limits-icon {
    width: 13px;
    height: 13px;
    color: #64748b;
    flex-shrink: 0;
}

.recording-limits .limits-icon svg {
    width: 100%;
    height: 100%;
}

.recording-limits .limits-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.recording-limits #remaining-time-display {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.2;
    white-space: nowrap;
}

.recording-limits .limits-label {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Recording limits warning states */
.recording-limits.warning {
    background: #fef9c3;
    border-color: #fbbf24;
}

.recording-limits.warning .limits-icon {
    color: #d97706;
}

.recording-limits.warning #remaining-time-display {
    color: #92400e;
}

.recording-limits.critical {
    background: #fee2e2;
    border-color: #f87171;
}

.recording-limits.critical .limits-icon {
    color: #dc2626;
}

.recording-limits.critical #remaining-time-display {
    color: #991b1b;
}

.recording-limits.exceeded {
    background: #fecaca;
    border-color: #ef4444;
}

.recording-limits.exceeded .limits-icon {
    color: #dc2626;
}

.recording-limits.exceeded #remaining-time-display {
    color: #991b1b;
}

.recording-limits.exceeded .limits-label::after {
    content: " (exceeded)";
}

/* Grace period state */
.recording-limits.grace-period {
    background: #fef3c7;
    border-color: #f59e0b;
    animation: gracePeriodPulse 2s infinite;
}

.recording-limits.grace-period .limits-icon {
    color: #d97706;
}

.recording-limits.grace-period #remaining-time-display {
    color: #92400e;
    font-weight: 700;
}

.recording-limits.grace-period .limits-label::after {
    content: " (grace period)";
}

@keyframes gracePeriodPulse {
    0%, 100% {
        border-color: #f59e0b;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        border-color: #d97706;
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
    }
}

.recording-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    padding: 0;
    background-color: #f9fafb;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none;
    flex-shrink: 0;
}

.recording-btn:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.15);
    background-color: #f9fafb;
}

.recording-btn:focus {
    outline: none;
}

.recording-btn .btn-icon {
    width: 20px;
    height: 20px;
}

.start-btn .btn-icon {
    color: #22c55e;
}

.start-btn:hover:not(:disabled) {
    background-color: rgba(34, 197, 94, 0.1);
}

.start-btn:hover:not(:disabled) .btn-icon {
    color: #15803d;
}

.pause-btn .btn-icon {
    color: #f59e0b;
}

.pause-btn:hover:not(:disabled) {
    background-color: rgba(245, 158, 11, 0.1);
}

.pause-btn:hover:not(:disabled) .btn-icon {
    color: #ea580c;
}

.resume-btn .btn-icon {
    color: #3b82f6;
}

.resume-btn:hover:not(:disabled) {
    background-color: rgba(59, 130, 246, 0.1);
}

.resume-btn:hover:not(:disabled) .btn-icon {
    color: #1d4ed8;
}

.stop-btn .btn-icon {
    color: #ef4444;
}

.stop-btn:hover:not(:disabled) {
    background-color: rgba(239, 68, 68, 0.1);
}

.stop-btn:hover:not(:disabled) .btn-icon {
    color: #b91c1c;
}

.finish-btn .btn-icon {
    color: #10b981;
}

.finish-btn:hover:not(:disabled) {
    background-color: rgba(16, 185, 129, 0.1);
}

.finish-btn:hover:not(:disabled) .btn-icon {
    color: #047857;
}

.finish-btn.completed {
    background-color: #e5e7eb;
}

.finish-btn.completed .btn-icon {
    color: #6b7280;
}

.recording-btn:disabled {
    background-color: #e5e7eb;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.recording-btn:disabled .btn-icon {
    color: #9ca3af;
}

.recording-btn:disabled:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.content-block {
    border: 1px solid #eee;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

/* Image Results Styling */
.image-results {
    display: none; /* Hidden by default until results are loaded */
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.image-card {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    height: 150px;
    position: relative;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-card .image-overlay {
    display: none; /* Hide the overlay containing captions */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 8px;
    transition: opacity 0.2s;
}

.image-card .image-title {
    display: none; /* Hide the title text */
    color: white;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Web Results Styling - Compact Google-like format */
.web-results {
    display: none; /* Hidden by default until results are loaded */
}

.web-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
}

.web-result-item {
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #dadce0;
    margin-bottom: 0;
}

.web-result-item:last-child {
    border-bottom: none;
}

.web-result-site-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.web-result-favicon {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    object-fit: contain;
}

.web-result-site-name {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #5f6368;
    margin: 0;
}

.web-result-title {
    margin-bottom: 4px;
}

.web-result-title a {
    color: #1a0dab;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 400;
    display: block;
}

.web-result-title a:hover {
    text-decoration: underline;
}

.web-result-title a:visited {
    color: #681da8;
}

.web-result-snippet {
    color: #4d5156;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 2px;
    max-width: 600px;
}

/* Dark theme support for web results */
[data-theme="dark"] .web-result-item {
    border-bottom-color: #3c4043;
}

[data-theme="dark"] .web-result-site-name {
    color: #9aa0a6;
}

[data-theme="dark"] .web-result-title a {
    color: #8ab4f8;
}

[data-theme="dark"] .web-result-title a:visited {
    color: #c58af9;
}

[data-theme="dark"] .web-result-snippet {
    color: #bdc1c6;
}

/* Video Results Styling */
.video-results {
    display: none; /* Hidden by default until results are loaded */
}

.video-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}

.video-result-card {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    cursor: pointer;
}

.video-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.video-result-item:first-child {
    padding-top: 8px;
}

.video-result-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.video-result-item:last-child {
    border-bottom: none;
}

.video-thumbnail {
    width: 120px;
    height: 68px;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    flex: 1;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.video-title a {
    color: #0d1ab1;
    text-decoration: none;
}

.video-channel, .video-date {
    font-size: 12px;
    color: #606060;
    margin-bottom: 2px;
}

/* Answer Results Styling */
.answer-results {
    display: none; /* Hidden by default until results are loaded */
}

.answer-card {
    background-color: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-top: 15px;
    border-left: 4px solid #3498db;
}

.answer-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.answer-text p {
    margin-bottom: 12px;
}

.answer-text p:last-child {
    margin-bottom: 0;
}

.sources-container {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 20px;
}

.sources-container h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.sources-list {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.sources-list h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.sources-list ul {
    padding-left: 20px;
    margin: 0;
}

.sources-list li {
    margin-bottom: 6px;
}

.sources-list a {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
}

/* Timeline Results Styles */
.result-timeline {
    width: 100%;
    padding: 0;
    margin: 0;
}

.timeline-section {
    background-color: transparent;
    padding: 0;
    margin-bottom: 10px;
}

.timeline-section.highlight {
    animation: highlight-pulse 1.5s ease-out;
}

.result-card.highlight {
    animation: card-highlight-pulse 1.5s ease-out;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(93, 79, 235, 0.4);
    }
    20% {
        box-shadow: 0 4px 10px 0 rgba(93, 79, 235, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(93, 79, 235, 0);
    }
}

@keyframes card-highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(93, 79, 235, 0.5);
        border-color: rgba(93, 79, 235, 0.3);
    }
    20% {
        box-shadow: 0 6px 15px 0 rgba(93, 79, 235, 0.4);
        border-color: rgba(93, 79, 235, 0.6);
    }
    100% {
        box-shadow: 0 1px 3px rgba(0,0,0,0.15);
        border-color: #eee;
    }
}

/* Image results grid in timeline */
.timeline-section .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 1px;
}

/* Web results in timeline */
.timeline-section .web-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Video results in timeline */
.timeline-section .video-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Answer results in timeline */
.timeline-section .answer-text {
    line-height: 1.6;
    color: #333;
}

/* Responsive adjustments for timeline view */
@media (max-width: 768px) {
    .timeline-section {
        padding: 12px;
    }

    .timeline-section .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .timeline-query-header {
        font-size: 16px;
    }
}

/* Responsive adjustments for small screens */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 120px);
        width: calc(100vw - 40px); /* Full width minus margins on mobile */
        margin: 20px; /* Reset to normal margins on mobile */
    }
    
    .queries-panel {
        width: 100%;
        min-width: 0;
        height: 300px; /* Fixed height on mobile */
        min-height: 300px;
        position: relative;
        top: 0;
    }

    .video-content {
        flex-direction: column;
    }

    .video-thumbnail-container {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
    }

    .answer-card {
        padding: 15px;
    }
}

/* Image Modal */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.image-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-modal-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.image-modal-container img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.2s;
    z-index: 1001;
}

.image-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Fix the results container to have no padding */
#resultsContainer {
    padding: 0;
    margin: 0;
}

/* Adjust the first card to align with the queries panel */
.result-card:first-child {
    margin-top: 0;
}

/* --- Side Navigation Bar Styles --- */
.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 64px;
    height: 100vh;
    background: #fafafd;
    box-shadow: 1px 0 8px 0 rgba(60,60,100,0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10000; /* Higher than subscription modal to stay accessible */
    border-right: 1px solid #e6e6f0;
    padding-top: 12px;
}

.side-nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: background 0.18s, box-shadow 0.18s;
    box-shadow: none;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.main-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.side-nav-logo .beta-badge {
    width: 33px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.side-nav-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.side-nav-logo:hover {
    background: #edeaff;
    box-shadow: 0 2px 8px 0 rgba(93,79,235,0.08);
}

/* Navigation items section */
.side-nav-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
}

/* Navigation buttons */
.side-nav-button, .theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, color 0.18s;
    color: #666;
    padding: 0;
}

.side-nav-button:hover, .theme-toggle:hover {
    background: #edeaff;
    box-shadow: 0 2px 8px 0 rgba(93,79,235,0.08);
    color: #5D4FEB;
}

.side-nav-button.active {
    background: #edeaff;
    color: #5D4FEB;
}

.nav-icon, .theme-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* FontAwesome icons within nav buttons */
.side-nav-button .nav-icon {
    font-size: 24px;
    width: 28px;
    height: 28px;
}

/* Push main content to the right to accommodate nav */
.container {
    margin-left: 64px;
}

@media (max-width: 768px) {
    .side-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 56px;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding-top: 0;
        padding-left: 8px;
        border-right: none;
        border-bottom: 1px solid #e6e6f0;
        box-shadow: 0 1px 8px 0 rgba(60,60,100,0.07);
        z-index: 10000; /* Ensure nav stays accessible on mobile too */
    }
    .side-nav-logo {
        margin-bottom: 0;
        margin-right: 24px;
        height: 40px;
    }
    
    .main-logo {
        width: 28px;
        height: 28px;
    }
    
    .side-nav-logo .beta-badge {
        width: 30px;
        height: 15px;
    }
    .side-nav-items {
        flex-direction: row;
        gap: 8px;
        margin-top: 0;
        margin-left: auto;
        margin-right: 8px;
    }
    .container {
        margin-left: 20px;
        margin-top: 56px;
        margin-right: 20px;
        width: calc(100vw - 40px);
    }
    
    .left-column {
        width: 100%;
        min-width: auto;
    }
    
    .recording-controls-wrapper {
        margin-bottom: 8px;
    }
}

/* Jump to Top Button */
.jump-to-top {
    position: fixed;
    top: 30px;
    left: calc(50% + 32px); /* Account for side nav width (64px / 2) */
    transform: translateX(-50%);
    background-color: #5D4FEB;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.jump-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.jump-to-top:hover {
    background-color: #4939e0;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Adjust position for mobile */
@media (max-width: 768px) {
    .jump-to-top {
        top: 70px; /* Account for mobile nav height */
        left: 50%;
        transform: translateX(-50%);
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .jump-to-top:hover {
        transform: translateX(-50%) translateY(-2px);
    }
}

/* --- Theme Toggle Styles --- */
.side-nav-bottom {
    margin-top: auto;
    margin-bottom: 32px; /* Increased from 16px to give more breathing room */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f0f0f0; /* Updated: Light gray tint for light mode default */
    border: none;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    position: relative;
    color: #666; /* Default icon color (sun icon in light mode) */
}

.theme-toggle:hover {
    background: #edeaff; /* Light purple for hover in light mode */
    box-shadow: 0 2px 8px 0 rgba(93,79,235,0.08);
    color: #5D4FEB; /* Purple icon on hover in light mode */
}

/* Specifically target the sun icon for default light mode color, if needed */
.sun-icon {
    color: #666;
}

/* Ensure sun icon gets hover color */
.theme-toggle:hover .sun-icon {
    color: #5D4FEB;
}

.theme-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg);
}

/* Dark mode icon states */
[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Mobile theme toggle positioning */
@media (max-width: 768px) {
    .side-nav-bottom {
        margin-left: auto;
        margin-right: 8px;
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* --- Dark Mode Styles --- */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

[data-theme="dark"] .side-nav {
    background: #2a2a2a;
    border-right: 1px solid #404040;
    box-shadow: 1px 0 8px 0 rgba(0,0,0,0.3);
}

[data-theme="dark"] .side-nav-logo:hover {
    background: #3a3a3a;
    box-shadow: 0 2px 8px 0 rgba(93,79,235,0.2);
}

[data-theme="dark"] .side-nav-button {
    background: transparent;
    color: #888;
}

[data-theme="dark"] .side-nav-button:hover {
    background: #4f4f4f;
    color: #ddd;
}

[data-theme="dark"] .theme-toggle {
    color: #7c6bff;
    background: #3a3a3a;
    box-shadow: 0 2px 8px 0 rgba(93,79,235,0.2);
}

[data-theme="dark"] .theme-toggle:hover {
    color: #b0b0b0;
    background: transparent;
    box-shadow: none;
}

/* Specifically target the moon icon in dark mode */
[data-theme="dark"] .moon-icon {
    color: #7c6bff;
}

[data-theme="dark"] .theme-toggle:hover .moon-icon {
    color: #b0b0b0;
}

[data-theme="dark"] .queries-panel {
    background-color: #2a2a2a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border: 1px solid #404040;
}

[data-theme="dark"] .queries-panel h2 {
    color: #7c6bff;
}

[data-theme="dark"] .query-item {
    background-color: #2a2a2a;
    border-bottom: 1px solid #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .query-item:hover {
    background-color: #333333;
}

[data-theme="dark"] .query-item:active {
    background-color: #3a3a3a;
}

[data-theme="dark"] .query-item .timestamp {
    color: #888;
}

[data-theme="dark"] .query-item .execute-all-btn {
    color: #666;
}

[data-theme="dark"] .query-item .execute-all-btn:hover {
    color: #7c6bff;
}

[data-theme="dark"] .query-item .execute-all-btn.all-complete {
    color: #4caf50;
    opacity: 0.6;
    transition: opacity 0.3s ease-out, transform 0.1s;
}

[data-theme="dark"] .query-item .execute-all-btn.all-complete:hover {
    color: #4caf50;
    opacity: 0.6;
}

[data-theme="dark"] .query-icon {
    color: #7c6bff;
}

[data-theme="dark"] .query-icon.clickable:hover {
    background-color: #4f4f4f;
}

[data-theme="dark"] .results-container {
    background-color: #333333;
    border: 1px solid #555;
    color: #e0e0e0;
}

[data-theme="dark"] .section {
    background-color: #2a2a2a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border: 1px solid #404040;
}

[data-theme="dark"] .result-card {
    background-color: #2a2a2a;
    border: 1px solid #404040;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .result-card-header {
    color: #e0e0e0;
}

[data-theme="dark"] .result-card-content {
    color: #d0d0d0;
}

[data-theme="dark"] button {
    background-color: #5D4FEB;
    color: white;
    border: none;
}

[data-theme="dark"] button:hover {
    background-color: #4939e0;
}

[data-theme="dark"] button:disabled {
    background-color: #555;
    color: #888;
}

[data-theme="dark"] button.stop {
    background-color: #dc3545;
}

[data-theme="dark"] button.stop:hover {
    background-color: #c82333;
}

[data-theme="dark"] .web-result-card {
    background-color: #2a2a2a;
    border: 1px solid #404040;
}

[data-theme="dark"] .web-result-card:hover {
    background-color: #333333;
}

[data-theme="dark"] .web-result-title a {
    color: #7c6bff;
}

[data-theme="dark"] .web-result-url {
    color: #888;
}

[data-theme="dark"] .web-result-snippet {
    color: #d0d0d0;
}

[data-theme="dark"] .video-result-card {
    background-color: #2a2a2a;
    border: 1px solid #404040;
}

[data-theme="dark"] .video-result-card:hover {
    background-color: #333333;
}

[data-theme="dark"] .video-result-item {
    border-bottom-color: #444444;
}

[data-theme="dark"] .video-title a {
    color: #7c6bff;
}

[data-theme="dark"] .video-channel,
[data-theme="dark"] .video-date {
    color: #888;
}

[data-theme="dark"] .answer-card {
    background-color: #2a2a2a;
    border: 1px solid #404040;
}

[data-theme="dark"] .answer-text {
    color: #d0d0d0;
}

[data-theme="dark"] .sources-list a {
    color: #7c6bff;
}

[data-theme="dark"] .image-modal-container {
    background-color: #2a2a2a;
}

[data-theme="dark"] .jump-to-top {
    background-color: #5D4FEB;
}

[data-theme="dark"] .jump-to-top:hover {
    background-color: #4939e0;
}

[data-theme="dark"] .expand-collapse-icon {
    color: #888;
}

[data-theme="dark"] .expand-collapse-icon:hover {
    color: #e0e0e0;
}

[data-theme="dark"] .external-link-button {
    color: #888;
}

[data-theme="dark"] .external-link-button:hover {
    color: #e0e0e0;
}

[data-theme="dark"] .result-card-header .icon {
    color: #7c6bff;
}

[data-theme="dark"] .result-card-header .title {
    color: #e0e0e0;
}

/* Markdown formatting styles for answer text */
.answer-text .markdown-paragraph {
    margin-bottom: 12px;
}

.answer-text .markdown-paragraph:last-child {
    margin-bottom: 0;
}

.answer-text strong {
    font-weight: 600;
    color: #2c3e50;
}

.answer-text em {
    font-style: italic;
    color: #34495e;
}

.answer-text code {
    background-color: #f1f3f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #d73e48;
}

.answer-text pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0;
    overflow-x: auto;
}

.answer-text pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    color: #333;
    font-size: 13px;
}

.answer-text .markdown-list {
    margin: 12px 0;
    padding-left: 0;
}

.answer-text .markdown-list li {
    margin-bottom: 6px;
    list-style: none;
    padding-left: 0;
}

.answer-text .numbered-list-item {
    color: #333;
    line-height: 1.5;
}

.answer-text .bullet-list-item {
    color: #333;
    line-height: 1.5;
}

.answer-text a {
    color: #3498db;
    text-decoration: none;
}

.answer-text a:hover {
    text-decoration: underline;
}

/* Dark theme markdown formatting styles */
[data-theme="dark"] .answer-text strong {
    color: #e8eaed;
}

[data-theme="dark"] .answer-text em {
    color: #d0d0d0;
}

[data-theme="dark"] .answer-text code {
    background-color: #3c4043;
    color: #f28b82;
}

[data-theme="dark"] .answer-text pre {
    background-color: #2a2a2a;
    border: 1px solid #444444;
}

[data-theme="dark"] .answer-text pre code {
    color: #e8eaed;
}

[data-theme="dark"] .answer-text .numbered-list-item,
[data-theme="dark"] .answer-text .bullet-list-item {
    color: #d0d0d0;
}

[data-theme="dark"] .answer-text a {
    color: #7c6bff;
}

/* Citation link styling */
.answer-text .citation-link {
    color: #007bff;
    font-weight: 500;
    text-decoration: none;
    padding: 1px 2px;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.answer-text .citation-link:hover {
    background-color: #e3f2fd;
    text-decoration: none;
}

/* Dark theme citation link styling */
[data-theme="dark"] .answer-text .citation-link {
    color: #8ab4f8;
}

[data-theme="dark"] .answer-text .citation-link:hover {
    background-color: #2d3748;
}

[data-theme="dark"] .bookmark-button {
    color: #888;
}

[data-theme="dark"] .bookmark-button:hover {
    color: #7c6bff;
}

[data-theme="dark"] .bookmark-button.bookmarked {
    color: #7c6bff;
}

[data-theme="dark"] .bookmark-button.bookmarked:hover {
    color: #5D4FEB;
}

/* Dark mode recording button styles */
[data-theme="dark"] .recording-controls {
    background: #2a2a2a;
    border: 1px solid #404040;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .recording-label {
    color: #e5e7eb;
}

[data-theme="dark"] .recording-timer {
    color: #f9fafb;
}

[data-theme="dark"] .recording-btn {
    background-color: #374151;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .recording-btn:hover:not(:disabled) {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .start-btn .btn-icon {
    color: #34d399;
}

[data-theme="dark"] .start-btn:hover:not(:disabled) {
    background-color: rgba(52, 211, 153, 0.15);
}

[data-theme="dark"] .start-btn:hover:not(:disabled) .btn-icon {
    color: #10b981;
}

[data-theme="dark"] .pause-btn .btn-icon {
    color: #fbbf24;
}

[data-theme="dark"] .pause-btn:hover:not(:disabled) {
    background-color: rgba(251, 191, 36, 0.15);
}

[data-theme="dark"] .pause-btn:hover:not(:disabled) .btn-icon {
    color: #f59e0b;
}

[data-theme="dark"] .resume-btn .btn-icon {
    color: #60a5fa;
}

[data-theme="dark"] .resume-btn:hover:not(:disabled) {
    background-color: rgba(96, 165, 250, 0.15);
}

[data-theme="dark"] .resume-btn:hover:not(:disabled) .btn-icon {
    color: #3b82f6;
}

[data-theme="dark"] .stop-btn .btn-icon {
    color: #f87171;
}

[data-theme="dark"] .stop-btn:hover:not(:disabled) {
    background-color: rgba(248, 113, 113, 0.15);
}

[data-theme="dark"] .stop-btn:hover:not(:disabled) .btn-icon {
    color: #ef4444;
}

[data-theme="dark"] .finish-btn .btn-icon {
    color: #34d399;
}

[data-theme="dark"] .finish-btn:hover:not(:disabled) {
    background-color: rgba(52, 211, 153, 0.15);
}

[data-theme="dark"] .finish-btn:hover:not(:disabled) .btn-icon {
    color: #10b981;
}

[data-theme="dark"] .finish-btn.completed {
    background-color: #4b5563;
}

[data-theme="dark"] .finish-btn.completed .btn-icon {
    color: #9ca3af;
}

[data-theme="dark"] .recording-btn:disabled {
    background-color: #4b5563;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .recording-btn:disabled .btn-icon {
    color: #6b7280;
}

[data-theme="dark"] .recording-btn:disabled:hover {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Dark mode recording limits styles */
[data-theme="dark"] .recording-limits {
    background: #374151;
    border: 1px solid #4b5563;
}

[data-theme="dark"] .recording-limits .limits-icon {
    color: #9ca3af;
}

[data-theme="dark"] .recording-limits #remaining-time-display {
    color: #e5e7eb;
}

[data-theme="dark"] .recording-limits .limits-label {
    color: #9ca3af;
}

/* Dark mode recording limits warning states */
[data-theme="dark"] .recording-limits.warning {
    background: #78350f;
    border-color: #f59e0b;
}

[data-theme="dark"] .recording-limits.warning .limits-icon {
    color: #fbbf24;
}

[data-theme="dark"] .recording-limits.warning #remaining-time-display {
    color: #fde68a;
}

[data-theme="dark"] .recording-limits.warning .limits-label {
    color: #fbbf24;
}

[data-theme="dark"] .recording-limits.critical {
    background: #7f1d1d;
    border-color: #ef4444;
}

[data-theme="dark"] .recording-limits.critical .limits-icon {
    color: #f87171;
}

[data-theme="dark"] .recording-limits.critical #remaining-time-display {
    color: #fecaca;
}

[data-theme="dark"] .recording-limits.critical .limits-label {
    color: #f87171;
}

[data-theme="dark"] .recording-limits.exceeded {
    background: #991b1b;
    border-color: #dc2626;
}

[data-theme="dark"] .recording-limits.exceeded .limits-icon {
    color: #fca5a5;
}

[data-theme="dark"] .recording-limits.exceeded #remaining-time-display {
    color: #fecaca;
}

[data-theme="dark"] .recording-limits.exceeded .limits-label {
    color: #fca5a5;
}

/* Dark mode grace period state */
[data-theme="dark"] .recording-limits.grace-period {
    background: #78350f;
    border-color: #f59e0b;
}

[data-theme="dark"] .recording-limits.grace-period .limits-icon {
    color: #fbbf24;
}

[data-theme="dark"] .recording-limits.grace-period #remaining-time-display {
    color: #fde68a;
}

[data-theme="dark"] .recording-limits.grace-period .limits-label {
    color: #fbbf24;
}

/* Mobile responsiveness for recording controls */
@media (max-width: 768px) {
    .recording-controls {
        gap: 8px;
        padding: 8px 12px;
    }
    
    .recording-timer {
        font-size: 16px;
        min-width: 50px;
    }
    
    .recording-buttons {
        gap: 6px;
    }
    
    .recording-btn {
        width: 40px;
        height: 40px;
        padding: 0;
    }
    
    .recording-btn .btn-icon {
        width: 18px;
        height: 18px;
    }
    
    .recording-limits {
        padding: 4px 8px;
        gap: 6px;
    }
    
    .recording-limits #remaining-time-display {
        font-size: 11px;
    }
    
    .recording-limits .limits-label {
        font-size: 9px;
    }
} 
/* ================================
   Recording History Page
   ================================ */

.recording-history-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
}

.history-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 48px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
  transform: translateX(-2px);
}

.back-button i {
  font-size: 18px;
}

.history-page-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
}

.history-page-content {
  flex: 1;
  overflow-y: auto;
  padding: 48px;
  background: var(--bg-primary);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.session-item {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(8px, 2vw, 16px);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-width: 0;
}

.session-item:hover {
  border-color: #5d4feb;
  box-shadow: 0 4px 12px rgba(93, 79, 235, 0.15);
  transform: translateY(-2px);
}

.session-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(8px, 2vw, 16px);
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.session-date {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 120px;
}

.session-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-primary);
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(93, 79, 235, 0.1) 0%, rgba(93, 79, 235, 0.05) 100%);
  border: 1.5px solid rgba(93, 79, 235, 0.3);
  border-radius: 20px;
  font-weight: 600;
}

.session-duration i {
  font-size: 13px;
  opacity: 0.7;
}

.session-topics {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-primary);
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1.5px solid rgba(34, 197, 94, 0.3);
  border-radius: 20px;
  font-weight: 500;
}

.session-topics i {
  font-size: 13px;
  opacity: 0.7;
  color: rgb(34, 197, 94);
}

.session-queries {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-primary);
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  font-weight: 500;
}

.session-queries i {
  font-size: 13px;
  opacity: 0.7;
  color: rgb(59, 130, 246);
}

.session-actions {
  display: flex;
  gap: clamp(4px, 1vw, 8px);
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.view-session-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.view-session-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-session-btn:active {
  transform: translateY(0);
}

.view-session-btn i {
  font-size: 13px;
}

.session-item.session-active {
  border-color: #5d4feb;
  background: linear-gradient(135deg, rgba(93, 79, 235, 0.05) 0%, rgba(93, 79, 235, 0.02) 100%);
  box-shadow: 0 2px 8px rgba(93, 79, 235, 0.15);
}

.session-item.session-active .view-session-btn {
  background: #e9ecef;
  color: #495057;
  border-color: #adb5bd;
}

.session-item.session-active .view-session-btn:hover {
  background: #dee2e6;
  border-color: #6c757d;
}

/* Session View Banner */
.session-view-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: linear-gradient(135deg, #5d4feb 0%, rgba(93, 79, 235, 0.9) 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(93, 79, 235, 0.4);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}

.banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.banner-info i {
  font-size: 18px;
}

.banner-title {
  font-weight: 700;
  font-size: 15px;
}

.banner-details {
  font-size: 14px;
  opacity: 0.9;
}

.banner-stat {
  font-size: 13px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.banner-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.banner-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.banner-close-btn i {
  font-size: 13px;
}

.download-transcript-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.download-transcript-btn:hover {
  background: #f0f9ff;
  border-color: #3b82f6;
  color: #2563eb;
  transform: scale(1.05);
}

.download-transcript-btn i {
  font-size: 14px;
}

.delete-session-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.delete-session-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.delete-session-btn i {
  font-size: 13px;
}

/* Transcript download button */
.download-transcript-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.download-transcript-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.download-transcript-btn i {
  font-size: 13px;
}

/* Audio download button */
.download-audio-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.download-audio-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.download-audio-btn i {
  font-size: 13px;
}

.no-sessions {
  text-align: center;
  padding: 96px 24px;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.no-sessions i {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.4;
}

.no-sessions p {
  margin: 12px 0;
  font-size: 18px;
}

.no-sessions .subtext {
  font-size: 15px;
  opacity: 0.7;
}

/* Dark theme overrides */
[data-theme="dark"] .session-item {
  background: #1f2937;
  border-color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .session-item:hover {
  border-color: #5d4feb;
  background: #2d3748;
  box-shadow: 0 4px 12px rgba(93, 79, 235, 0.25);
}

[data-theme="dark"] .session-duration {
  background: linear-gradient(135deg, rgba(93, 79, 235, 0.2) 0%, rgba(93, 79, 235, 0.1) 100%);
  border-color: rgba(93, 79, 235, 0.4);
  color: #e0e7ff;
}

[data-theme="dark"] .session-topics {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
  border-color: rgba(34, 197, 94, 0.4);
  color: #d1fae5;
}

[data-theme="dark"] .session-topics i {
  color: rgb(74, 222, 128);
}

[data-theme="dark"] .session-queries {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  color: #dbeafe;
}

[data-theme="dark"] .session-queries i {
  color: rgb(96, 165, 250);
}

[data-theme="dark"] .view-session-btn {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}

[data-theme="dark"] .view-session-btn:hover {
  background: #4b5563;
  border-color: #6b7280;
}

[data-theme="dark"] .session-item.session-active {
  background: linear-gradient(135deg, rgba(93, 79, 235, 0.15) 0%, rgba(93, 79, 235, 0.05) 100%);
  border-color: #5d4feb;
}

[data-theme="dark"] .session-item.session-active .view-session-btn {
  background: #4b5563;
  color: #e5e7eb;
  border-color: #6b7280;
}

[data-theme="dark"] .session-view-banner {
  background: linear-gradient(135deg, rgba(93, 79, 235, 0.95) 0%, rgba(93, 79, 235, 0.85) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .download-transcript-btn {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}

[data-theme="dark"] .download-transcript-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #93c5fd;
}

[data-theme="dark"] .delete-session-btn {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}

[data-theme="dark"] .delete-session-btn:hover {
  background: #4b5563;
  border-color: #6b7280;
  color: #e5e7eb;
}

[data-theme="dark"] .download-transcript-btn {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}

[data-theme="dark"] .download-transcript-btn:hover {
  background: #4b5563;
  border-color: #6b7280;
  color: #e5e7eb;
}

[data-theme="dark"] .download-audio-btn {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}

[data-theme="dark"] .download-audio-btn:hover {
  background: #4b5563;
  border-color: #6b7280;
  color: #e5e7eb;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .history-page-header {
    padding: 24px;
  }

  .history-page-header h1 {
    font-size: 24px;
  }

  .history-page-content {
    padding: 24px 16px;
  }

  .session-item {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    border-radius: 10px;
  }

  .session-info {
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(8px, 2vw, 12px);
    width: 100%;
  }

  .session-date {
    min-width: auto;
  }

  .session-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: clamp(4px, 1.5vw, 8px);
  }

  .view-session-btn,
  .download-transcript-btn,
  .download-audio-btn,
  .delete-session-btn {
    padding: 8px 12px;
    font-size: 13px;
    min-width: auto;
  }
}

/* Additional responsive breakpoint for very small screens */
@media (max-width: 480px) {
  .session-item {
    padding: 12px 16px;
    gap: 16px;
  }

  .session-info {
    gap: clamp(6px, 1.5vw, 10px);
    flex-wrap: wrap;
  }

  .session-duration,
  .session-topics,
  .session-queries {
    padding: 6px 12px;
    font-size: 13px;
  }

  .session-actions {
    gap: clamp(3px, 1vw, 6px);
    justify-content: center;
  }

  .view-session-btn,
  .download-transcript-btn,
  .download-audio-btn,
  .delete-session-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: 0;
    justify-content: center;
  }
}

/* ================================================
   UPGRADE CONTAINER STYLING
   ================================================ */

.upgrade-container {
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease-out;
}

.upgrade-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upgrade-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.upgrade-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.upgrade-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.upgrade-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  animation: pulse 2s infinite;
}

.upgrade-icon svg {
  width: 100%;
  height: 100%;
  stroke: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.upgrade-header h3 {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  letter-spacing: -0.5px;
}

.upgrade-header p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  line-height: 1.4;
}

.upgrade-features {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.upgrade-features .feature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 0;
}

.upgrade-features .feature:last-child {
  margin-bottom: 0;
}

.upgrade-features .feature svg {
  width: 18px;
  height: 18px;
  stroke: #4ade80;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.upgrade-features .feature span {
  color: white;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.upgrade-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.upgrade-button:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.02);
}

.upgrade-button:active {
  transform: scale(0.98);
}

.upgrade-button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.upgrade-button:hover svg {
  transform: translateX(4px);
}

/* Dark mode overrides for upgrade container */
[data-theme="dark"] .upgrade-card {
  background: linear-gradient(135deg, #5b21b6 0%, #1e1b4b 100%);
  box-shadow: 0 10px 30px rgba(91, 33, 182, 0.3);
}

[data-theme="dark"] .upgrade-card:hover {
  box-shadow: 0 20px 40px rgba(91, 33, 182, 0.4);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Mobile responsiveness for upgrade container */
@media (max-width: 768px) {
  .upgrade-card {
    padding: 20px;
    margin-bottom: 16px;
  }
  
  .upgrade-header h3 {
    font-size: 20px;
  }
  
  .upgrade-header p {
    font-size: 13px;
  }
  
  .upgrade-button {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .upgrade-features .feature span {
    font-size: 13px;
  }
}

/* ================================================
   SUBSCRIPTION MODAL STYLING
   ================================================ */

.subscription-modal {
  position: fixed;
  top: 0;
  left: 64px; /* Start after sidebar to keep navigation accessible */
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: modalFadeIn 0.3s ease-out;
}

.subscription-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

/* Ensure sidebar stays accessible on mobile */
@media (max-width: 768px) {
  .subscription-modal {
    left: 0; /* Full width on mobile since nav moves to top */
    top: 56px; /* Start below mobile nav bar */
  }
}

.subscription-modal-content {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: 16px;
  padding: 24px 20px 20px;
  max-width: 950px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.subscription-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

/* Billing Toggle Styles */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding: 4px;
  background: #f8fafc;
  border-radius: 50px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.billing-option {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.billing-option.active {
  color: #5B3AFF;
}

.save-badge {
  background: #10b981;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  border-radius: 24px;
  transition: .4s;
}

.toggle-switch label:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}

.toggle-switch input:checked + label {
  background-color: #5B3AFF;
}

.toggle-switch input:checked + label:before {
  transform: translateX(20px);
}

.subscription-modal-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.subscription-modal-header p {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.subscription-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 12px;
  margin-top: 20px;
}

.plan-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.plan-card:hover {
  border-color: #5B3AFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(91, 58, 255, 0.15);
}

.plan-card.featured {
  border-color: #5B3AFF;
  border-width: 2px;
  background: white;
  color: inherit;
  position: relative;
  box-shadow: 0 8px 25px rgba(91, 58, 255, 0.15);
}

.plan-card.featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(91, 58, 255, 0.25);
}

.plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #5B3AFF;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(91, 58, 255, 0.3);
}

.plan-header h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1a1a1a;
}

.plan-card.featured .plan-header h3 {
  color: #1a1a1a;
}

.plan-description {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 12px 0;
  line-height: 1.4;
  min-height: 36px;
}

.plan-card.featured .plan-description {
  color: #64748b;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 16px;
  margin-top: 4px;
}

.plan-price .currency {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  opacity: 0.8;
}

.plan-price .amount {
  font-size: 48px;
  font-weight: 700;
  margin: 0 2px;
  line-height: 1;
  color: #5B3AFF;
}

.plan-price .cents {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  vertical-align: super;
  color: #374151;
  opacity: 0.8;
  margin-right: 2px;
}

.plan-price .period {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  opacity: 0.8;
}

.plan-price.contact-sales {
  justify-content: center;
}

.contact-text {
  font-size: 20px;
  font-weight: 600;
  color: #5B3AFF;
}

.billing-info {
  margin-top: 4px;
  margin-bottom: 12px;
  min-height: 18px;
}

.annual-billing {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.save-percentage {
  background: #10b981;
  color: white;
  padding: 1px 4px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.plan-features {
  margin-bottom: 16px;
  text-align: left;
  flex: 1;
}

.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0;
}

.plan-feature:last-child {
  margin-bottom: 0;
}

.feature-bullet {
  font-size: 16px;
  color: #5B3AFF;
  font-weight: bold;
  line-height: 1.5;
  margin-top: 1px;
}

.plan-card.featured .feature-bullet {
  color: #5B3AFF;
}

.plan-feature span:not(.feature-bullet) {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.plan-card.featured .plan-feature span:not(.feature-bullet) {
  color: #374151;
}

.plan-button {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #5B3AFF;
  background: transparent;
  border-radius: 10px;
  color: #5B3AFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.plan-button:hover {
  background: #5B3AFF;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(91, 58, 255, 0.3);
}

.plan-button.featured {
  background: #5B3AFF;
  border-color: #5B3AFF;
  color: white;
}

.plan-button.featured:hover {
  background: #4829cc;
  border-color: #4829cc;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(91, 58, 255, 0.4);
}

.plan-button.contact {
  border-color: #64748b;
  color: #64748b;
}

.plan-button.contact:hover {
  background: #64748b;
  color: white;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.subscription-modal-footer {
  text-align: center;
  padding-top: 12px;
  margin-top: 8px;
}

.subscription-modal-footer p {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
  line-height: 1.4;
}

/* Dark mode overrides for subscription modal */
[data-theme="dark"] .subscription-modal-content {
  background: #1e293b;
  color: #e2e8f0;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .subscription-modal-overlay {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .subscription-modal-header h2 {
  color: #f1f5f9;
}

[data-theme="dark"] .subscription-modal-header p {
  color: #94a3b8;
}

[data-theme="dark"] .plan-card {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .plan-card:hover {
  border-color: #5B3AFF;
  background: #3b4a5f;
  box-shadow: 0 8px 25px rgba(91, 58, 255, 0.3);
}

[data-theme="dark"] .plan-card.featured {
  background: #3b4a5f;
  border-color: #5B3AFF;
  box-shadow: 0 8px 25px rgba(91, 58, 255, 0.3);
}

[data-theme="dark"] .plan-card.featured:hover {
  background: #3b4a5f;
  box-shadow: 0 12px 35px rgba(91, 58, 255, 0.4);
}

[data-theme="dark"] .plan-header h3 {
  color: #f8fafc;
}

[data-theme="dark"] .plan-card.featured .plan-header h3 {
  color: #ffffff;
}

[data-theme="dark"] .plan-description {
  color: #94a3b8;
}

[data-theme="dark"] .plan-card.featured .plan-description {
  color: #a5b4c9;
}

[data-theme="dark"] .plan-price .currency {
  color: #e2e8f0;
  opacity: 1;
}

[data-theme="dark"] .plan-price .amount {
  color: #a78bfa;
}

[data-theme="dark"] .plan-price .period {
  color: #cbd5e1;
}

[data-theme="dark"] .plan-price .cents {
  color: #cbd5e1;
}

[data-theme="dark"] .annual-billing {
  color: #94a3b8;
}

[data-theme="dark"] .save-percentage {
  color: #ffffff;
}

[data-theme="dark"] .plan-feature span {
  color: #cbd5e1;
}

[data-theme="dark"] .plan-feature span:not(.feature-bullet) {
  color: #cbd5e1;
}

[data-theme="dark"] .plan-card.featured .plan-feature span:not(.feature-bullet) {
  color: #cbd5e1;
}

[data-theme="dark"] .feature-bullet {
  color: #8b7fff;
}

[data-theme="dark"] .plan-card.featured .feature-bullet {
  color: #8b7fff;
}

[data-theme="dark"] .plan-button {
  background: transparent;
  border: 2px solid #6366f1;
  color: #ffffff;
}

[data-theme="dark"] .plan-button:hover {
  background: #5B3AFF;
  border-color: #5B3AFF;
  color: white;
  box-shadow: 0 4px 12px rgba(91, 58, 255, 0.4);
}

[data-theme="dark"] .plan-button.featured {
  background: #5B3AFF;
  border: 2px solid #5B3AFF;
  color: white;
}

[data-theme="dark"] .plan-button.featured:hover {
  background: #7C5DFF;
  border: 2px solid #7C5DFF;
  box-shadow: 0 4px 12px rgba(124, 93, 255, 0.5);
}

[data-theme="dark"] .billing-toggle {
  background: #1e293b;
  border: 1px solid #475569;
}

[data-theme="dark"] .billing-option {
  color: #94a3b8;
  border-radius: 50px;
  padding: 8px 20px;
}

[data-theme="dark"] .billing-option.active {
  color: #ffffff;
  background: transparent;
  font-weight: 700;
}

[data-theme="dark"] .toggle-switch label {
  background-color: #475569;
}

[data-theme="dark"] .toggle-switch input:checked + label {
  background-color: #5B3AFF;
}

[data-theme="dark"] .toggle-switch label:before {
  background-color: #f1f5f9;
}

[data-theme="dark"] .save-badge {
  background: #16a34a;
  color: white;
}

[data-theme="dark"] .subscription-modal-footer p {
  color: #64748b;
}

/* Animations for modal */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile responsiveness for subscription modal */
@media (max-width: 768px) {
  .subscription-modal {
    padding: 20px;
  }
  
  .subscription-modal-content {
    padding: 16px;
    border-radius: 12px;
    max-height: 90vh;
  }
  
  .subscription-modal-header h2 {
    font-size: 24px;
  }
  
  .subscription-modal-header p {
    font-size: 14px;
  }
  
  .subscription-plans {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .plan-card {
    padding: 16px 12px;
  }
  
  .plan-card.featured {
    transform: none;
  }
  
  .plan-card.featured:hover {
    transform: translateY(-2px);
  }
  
  .plan-price .amount {
    font-size: 36px;
  }
  
  .plan-button {
    padding: 10px 16px;
    font-size: 13px;
  }
}