/* CSS Custom Properties for animated border */
@property --gradient-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    font-size: 16px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
.header {
    padding: 16px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(10,10,10,0.95) 0%, rgba(40,40,40,0.9) 30%, rgba(60,60,60,0.8) 70%, rgba(20,20,20,0.95) 100%);
    border-radius: 20px;
    margin: 20px 0 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 
                0 2px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Free tier header styling */
.header-free {
    background: linear-gradient(135deg, rgba(0,0,0,0.05) 0%, rgba(255,255,255,0.1) 100%);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 
                0 2px 8px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* User info section in header */
.user-info {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    text-align: right;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-message {
    color: #fff;
    margin-bottom: 0;
}

.welcome-message span {
    font-size: 14px;
    display: block;
}

.welcome-message small {
    font-size: 12px;
    color: #ccc;
    display: block;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: flex-end;
    align-items: flex-end;
}

.admin-link, .logout-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.admin-link:hover, .logout-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.admin-link svg, .logout-link svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .user-info {
        position: static;
        margin-top: 20px;
        text-align: center;
    }
    
    .header-actions {
        justify-content: center;
    }
}

.header::after {
    content: "";
    position: absolute;
    inset: -1px;
    background: conic-gradient(
        from var(--gradient-angle),
        rgba(100, 100, 100, 0.3),
        rgba(150, 150, 150, 0.4),
        rgba(200, 200, 200, 0.5),
        rgba(180, 180, 180, 0.4),
        rgba(120, 120, 120, 0.3),
        rgba(150, 150, 150, 0.4),
        rgba(100, 100, 100, 0.3)
    );
    border-radius: inherit;
    animation: rotateBorder 6s linear infinite;
    z-index: -1;
}

/* Free tier header animated golden border */
.header-free::after {
    content: "";
    position: absolute;
    inset: -1px;
    background: conic-gradient(
        from var(--gradient-angle),
        rgba(218, 165, 32, 0.2),    /* Goldenrod */
        rgba(240, 230, 140, 0.3),    /* Khaki */
        rgba(255, 248, 220, 0.4),    /* Cornsilk */
        rgba(255, 215, 0, 0.3),      /* Gold */
        rgba(255, 165, 0, 0.3),      /* Orange */
        rgba(240, 230, 140, 0.3),    /* Khaki */
        rgba(218, 165, 32, 0.2)      /* Goldenrod */
    );
    border-radius: inherit;
    animation: rotateBorder 4s linear infinite;
    z-index: -2;
}

@keyframes rotateBorder {
    0% {
        --gradient-angle: 0deg;
    }
    100% {
        --gradient-angle: 360deg;
    }
}



.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.logo {
    height: 70px;
    width: auto;
    border-radius: 8px;
    filter: invert(1) brightness(1.2) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8)) 
            drop-shadow(0 0 4px rgba(0, 0, 0, 0.6))
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
}

/* Free tier logo styling - black appearance with white drop shadow */
.logo-free {
    filter: invert(0) brightness(0.9) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.5)) 
            drop-shadow(0 0 4px rgba(255, 255, 255, 0.3))
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3),
                 0 2px 4px rgba(0, 0, 0, 0.5),
                 0 0 30px rgba(255, 255, 255, 0.2);
}

.brand-subtitle {
    font-size: 1rem;
    color: #bbb;
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-stretch: condensed;
    line-height: 1.4;
    margin-top: 12px;
    letter-spacing: -0.02em;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15),
                 0 1px 2px rgba(0, 0, 0, 0.4);
}

.subtitle-uniform {
    font-size: 1rem;
    font-weight: 300;
    color: #ddd;
}

.subtitle-small {
    font-size: 0.9rem;
    font-weight: 300;
    color: #aaa;
    letter-spacing: -0.01em;
}

.subtitle-emphasis {
    font-size: 1.1rem;
    font-weight: 300;
    color: #e8e8e8;
    letter-spacing: -0.01em;
}

.orange-underlined {
    border-bottom: 1px solid #ff6b35;
    padding-bottom: 1px;
    display: inline-block;
}

.typewriter {
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    min-height: 1.2em;
}

.typewriter.typing,
.typewriter.typed-complete {
    opacity: 1;
}

.typewriter.typing::after {
    content: '|';
    color: #ff6b35;
    animation: blink 1s infinite;
    margin-left: 2px;
}

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

.underlined {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 1px;
    display: inline-block;
}

/* Free tier text styling for better contrast on beige background */
.header-free .brand-subtitle {
    color: #4a4a4a;
    font-weight: 300;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8),
                 0 0 4px rgba(0, 0, 0, 0.08);
    letter-spacing: -0.02em;
}

.header-free .subtitle-uniform {
    color: #555;
    font-weight: 300;
}

.header-free .subtitle-small {
    color: #777;
    font-weight: 300;
}

.header-free .subtitle-emphasis {
    color: #333;
    font-weight: 300;
}

.header-free .orange-underlined {
    border-bottom: 1px solid #ff6b35;
}

.header-free .underlined {
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

/* Update user info for free tier */
.header-free .welcome-message {
    color: #333;
}

.header-free .welcome-message small {
    color: #666;
}

/* Update header action buttons for free tier */
.header-free .admin-link, 
.header-free .logout-link {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    backdrop-filter: blur(5px);
}

.header-free .admin-link:hover, 
.header-free .logout-link:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Free tier Get Pro and Login button styling */
.header-free .get-pro-btn {
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

.header-free .get-pro-btn:hover {
    color: #000 !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

.header-free .login-link {
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

.header-free .login-link:hover {
    color: #000 !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

/* Navigation Tabs */
.navigation-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 5px 0 30px;
    padding: 0 20px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    color: #333;
    text-decoration: none;
    font-family: inherit;
}

.nav-tab:hover:not(.nav-tab-disabled) {
    border-color: #ff8c00;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3), 
                0 0 0 2px rgba(255, 140, 0, 0.1);
    transform: translateY(-1px);
}

.nav-tab-active {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1) 0%, rgba(255, 140, 0, 0.05) 100%);
    border-color: #ff8c00;
    color: #ff8c00;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.2);
}

.nav-tab-active svg {
    stroke: #ff8c00;
}

.nav-tab-disabled {
    background: #f8f8f8;
    color: #999;
    cursor: not-allowed;
    border-color: #e8e8e8;
}

.nav-tab-disabled:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #e8e8e8;
}

.nav-tab-disabled svg {
    stroke: #ccc;
}

/* Subtle navigation tab for custom monitors */
.nav-tab-subtle {
    background: #f8f8f8;
    color: #333;
    border-color: #e0e0e0;
}

.nav-tab-subtle:hover:not(.nav-tab-disabled) {
    border-color: #ff8c00;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3), 
                0 0 0 2px rgba(255, 140, 0, 0.1);
    transform: translateY(-1px);
}

.nav-tab-subtle svg {
    fill: #333;
}

/* Features grid for Social Unrest Cell page */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(0,0,0,0.02) 100%);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.feature-card h3 {
    margin-bottom: 16px;
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Social Unrest Cell Monitoring Dashboard */
.search-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.compact-search {
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
    transition: all 0.2s ease;
    flex: 1;
    max-width: 300px;
}

.compact-search:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.1);
}

.compact-filter {
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
    transition: all 0.2s ease;
    min-width: 100px;
}

.compact-filter:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.1);
}

.claims-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.claim-card {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.claim-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.claim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.risk-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.risk-badge.high {
    background: #dc3545;
    color: white;
}

.risk-badge.medium {
    background: #fd7e14;
    color: white;
}

.risk-badge.low {
    background: #28a745;
    color: white;
}

.claim-timestamp {
    font-size: 0.7rem;
    color: #888;
}

.claim-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.claim-description {
    color: #666;
    line-height: 1.4;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.tweets-section {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 12px;
}

.tweet-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tweet-item {
    background: rgba(248,248,248,0.8);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.04);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tweet-item:hover {
    background: rgba(255, 140, 0, 0.05);
    border-color: rgba(255, 140, 0, 0.2);
    transform: translateY(-1px);
}

.tweet-author {
    font-weight: 600;
    color: #333;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.tweet-text {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.3;
}

.claim-card[style*="display: none"] {
    display: none !important;
}

@media (max-width: 768px) {
    .claims-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .stat-item {
        padding: 12px;
        background: rgba(255,255,255,0.5);
        border-radius: 8px;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .risk-filter {
        margin-left: 0;
    }
}

.coming-soon {
    font-size: 10px;
    background: #f0f0f0;
    color: #666;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 400;
}



.bespoke-pill {
    font-size: 10px;
    background: #fff4e6;
    color: #e67e22;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 400;
}

@media (max-width: 768px) {
    .navigation-tabs {
        gap: 8px;
        padding: 0 10px;
    }
    
    .nav-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .nav-tab svg {
        width: 14px;
        height: 14px;
    }
    
    .coming-soon,
    .bespoke-pill {
        display: none;
    }
}





/* Main content */
.main-content {
    flex: 1;
    padding: 20px 0;
}

/* Search section */
.search-section {
    margin-bottom: 40px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px 30px 30px 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(0,0,0,0.02) 100%);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.search-input {
    padding: 15px 20px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.1);
}

.search-button {
    padding: 15px 25px;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.6);
}

.search-button:active {
    transform: translateY(0);
}

.search-icon {
    flex-shrink: 0;
}

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
    flex: 1;
    width: 100%;
}

.autocomplete-loading {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0,0,0,0.4);
    z-index: 2;
}

.autocomplete-loading svg {
    animation: spin 1s linear infinite;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    min-width: 100%;
}

.autocomplete-dropdown:empty {
    display: none;
}

.autocomplete-suggestions {
    padding: 8px 0;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    gap: 12px;
}

.suggestion-item:hover {
    background: rgba(0,0,0,0.05);
}

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

.suggestion-icon {
    color: rgba(0,0,0,0.6);
    flex-shrink: 0;
}

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

.suggestion-label {
    font-weight: 600;
    color: #000;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.suggestion-prefix {
    background: #4f46e5;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: lowercase;
    flex-shrink: 0;
}

.suggestion-type {
    font-size: 12px;
    color: rgba(0,0,0,0.6);
    margin-top: 2px;
}

.suggestion-score {
    flex-shrink: 0;
}

.score-badge {
    background: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.7);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

.suggestion-footer {
    padding: 8px 16px;
    text-align: center;
    color: rgba(0,0,0,0.5);
    font-size: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.autocomplete-no-results {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
    color: rgba(0,0,0,0.5);
}

.no-results-icon {
    flex-shrink: 0;
}

.no-results-text {
    font-size: 14px;
}

.no-results-text small {
    display: block;
    font-size: 12px;
    margin-top: 2px;
    color: rgba(0,0,0,0.4);
}

/* Selected Concepts Pills */
.selected-concepts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.selected-concepts:empty {
    display: none;
}

.concept-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 10px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    color: #000;
    transition: all 0.2s ease;
}

.concept-pill:hover {
    background: rgba(0,0,0,0.15);
}

.pill-icon {
    color: rgba(0,0,0,0.6);
    flex-shrink: 0;
}

.pill-label {
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pill-remove {
    background: none;
    border: none;
    color: rgba(0,0,0,0.6);
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pill-remove:hover {
    background: rgba(255,0,0,0.1);
    color: #ff0000;
}

/* Animation for spinning loading icon */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-description {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Date selector styling */
.date-selector-wrapper {
    position: relative;
    display: inline-block;
}

.date-selector {
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: 1px dotted #666;
    color: #666;
    font-size: 14px;
    font-family: inherit;
    padding: 2px 20px 2px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.date-selector:hover {
    color: #000;
    border-bottom-color: #000;
}

.date-selector:focus {
    outline: none;
    color: #000;
    border-bottom-color: #000;
}

.dropdown-arrow {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    transition: all 0.2s ease;
}

.date-selector:hover + .dropdown-arrow,
.date-selector:focus + .dropdown-arrow {
    color: #000;
}

/* Country selector styling - similar to date selector */
.country-selector-wrapper {
    position: relative;
    display: inline-block;
}

.country-selector {
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: 1px dotted #666;
    color: #666;
    font-size: 14px;
    font-family: inherit;
    padding: 2px 20px 2px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.country-selector:hover {
    color: #000;
    border-bottom-color: #000;
}

.country-selector:focus {
    outline: none;
    color: #000;
    border-bottom-color: #000;
}

.country-selector:hover + .dropdown-arrow,
.country-selector:focus + .dropdown-arrow {
    color: #000;
}

/* Old briefing button styles removed - using modern design now */

/* Email briefing bar */
.email-briefing-bar {
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px 25px;
}

.email-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.email-bar-label {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
}

.email-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.email-input:focus {
    border-color: #6b7280;
}

.email-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #374151;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.email-send-btn:hover {
    background: #1f2937;
}

/* Email status messages */
.email-status {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.email-status.success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #10b981;
}

.email-status.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #ef4444;
}

/* Modern briefing button spinner */
.briefing-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(107, 114, 128, 0.2);
    border-top: 2px solid #6b7280;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 20px;
}

/* Loading state for modern briefing buttons */
.modern-briefing-btn.htmx-request .briefing-text {
    opacity: 0.5;
    margin-left: 16px;
}

.modern-briefing-btn.htmx-request .briefing-icon-container {
    opacity: 0.3;
}

.modern-briefing-btn.htmx-request .briefing-spinner {
    display: block;
}

/* Loading cursor for modern buttons */
.modern-briefing-btn.htmx-request {
    cursor: wait;
    pointer-events: none;
}

/* Legacy button support - keeping for compatibility */
.risk-briefing-btn.htmx-request .btn-text,
.risk-briefing-btn.htmx-request .briefing-icon {
    display: none;
}

.risk-briefing-btn.htmx-request .briefing-spinner {
    display: block;
    position: static;
}

.narratives-briefing-btn.htmx-request .btn-text,
.narratives-briefing-btn.htmx-request .briefing-icon {
    display: none;
}

.narratives-briefing-btn.htmx-request .briefing-spinner {
    display: block;
    position: static;
}

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

/* Briefing modal specific styles */
.briefing-error {
    text-align: center;
    padding: 40px;
    color: #dc2626;
}

.briefing-error .error-icon {
    margin: 0 auto 15px;
    color: #dc2626;
}

.briefing-summary {
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.briefing-summary h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: #000;
}

.summary-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #000;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.risk-level-high .stat-number {
    color: #dc2626;
}

.risk-level-medium .stat-number {
    color: #d97706;
}

.risk-level-low .stat-number {
    color: #059669;
}

.operational-risk-badge {
    display: none; /* Hidden but can be easily re-enabled by changing to inline-flex */
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.operational-high {
    background: #fee2e2;
    color: #dc2626;
}

.operational-medium {
    background: #fef3c7;
    color: #d97706;
}

.operational-low {
    background: #ecfdf5;
    color: #059669;
}

/* Key Narratives Badge Styles */
.source-influence-badge,
.volatility-risk-badge,
.materiality-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Source Influence Badge Colors */
.influence-high {
    background: #ddd6fe;
    color: #7c3aed;
}

.influence-medium {
    background: #e0e7ff;
    color: #6366f1;
}

.influence-low {
    background: #f1f5f9;
    color: #64748b;
}

/* Volatility Risk Badge Colors */
.volatility-high {
    background: #fee2e2;
    color: #dc2626;
}

.volatility-medium {
    background: #fef3c7;
    color: #d97706;
}

.volatility-low {
    background: #ecfdf5;
    color: #059669;
}

/* Materiality Badge Colors */
.materiality-high {
    background: #dcfce7;
    color: #16a34a;
}

.materiality-medium {
    background: #fef3c7;
    color: #ca8a04;
}

.materiality-low {
    background: #f1f5f9;
    color: #64748b;
}

.influence-icon,
.volatility-icon,
.materiality-icon {
    flex-shrink: 0;
}

/* Explanation text for key narratives */
.narrative-explanation-brief {
    color: #666;
    font-style: italic;
    font-size: 15px;
    line-height: 1.5;
    margin: 12px 0 20px 0;
}

.narrative-metrics {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.metric {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.no-narratives {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-narratives .info-icon {
    margin: 0 auto 20px;
    color: #059669;
}

.no-narratives h3 {
    color: #000;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.no-narratives p {
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Two-line scrolling suggested searches styling */
.suggested-searches-scrolling {
    margin: 15px 0 10px;
    width: 100%;
    overflow: hidden;
}

.scrolling-row {
    display: flex;
    position: relative;
    margin-bottom: 10px;
    overflow: hidden;
}

.scrolling-row:last-child {
    margin-bottom: 0;
}

/* Top row scrolls left */
.scrolling-row.scroll-left .scrolling-content {
    animation: scrollLeft 30s linear infinite;
}

/* Bottom row scrolls right */
.scrolling-row.scroll-right .scrolling-content {
    animation: scrollRight 35s linear infinite;
}

.scrolling-content {
    display: flex;
    gap: 12px;
    min-width: 100%;
    padding: 5px 0;
}

/* Fade-out edges - white background */
.scrolling-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    z-index: 10;
    pointer-events: none;
}

.scrolling-row::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    z-index: 10;
    pointer-events: none;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Legacy single-line styling kept for backwards compatibility */
.suggested-searches {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 15px 0 10px;
    flex-wrap: wrap;
}

.suggestion-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 300;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

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

.suggestion-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.suggestion-logo svg {
    width: 16px;
    height: 16px;
}

.suggestion-btn span {
    font-weight: 300;
    white-space: nowrap;
}

/* Trending section */
.trending-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 15px 0 10px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.trending-icon {
    flex-shrink: 0;
    color: #333;
    width: 16px;
    height: 16px;
}

.trending-label {
    color: #333;
    font-weight: 500;
}

.trending-term {
    color: #333;
    text-decoration: underline;
    text-decoration-style: solid;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.trending-term:hover {
    color: #000;
    text-decoration-color: #000;
}

/* Loading indicator */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
}

.loading-indicator.htmx-request {
    display: flex;
}

.blob {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #F59E0B, #FBBF24, #FCD34D, #F59E0B);
    background-size: 200% 200%;
    filter: blur(2px);
    animation: morph 4s ease-in-out infinite, gradient 3s ease infinite;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: scale(1.1) rotate(90deg);
        opacity: 0.9;
    }
    50% {
        border-radius: 50% 60% 40% 30% / 40% 50% 60% 50%;
        transform: scale(0.9) rotate(180deg);
        opacity: 1;
    }
    75% {
        border-radius: 70% 30% 50% 50% / 30% 70% 50% 60%;
        transform: scale(1.05) rotate(270deg);
        opacity: 0.95;
    }
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.shimmer-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: #666;
    background: linear-gradient(
        90deg,
        #999 0%,
        #D97706 20%,
        #F59E0B 40%,
        #FBBF24 50%,
        #F59E0B 60%,
        #D97706 80%,
        #999 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2s linear infinite;
    min-height: 20px;
    white-space: nowrap;
    transition: opacity 0.2s ease-out, filter 0.2s ease-out;
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer-text.blur-out {
    opacity: 0;
    filter: blur(10px);
}

.shimmer-text.changing {
    animation: shimmer 2s linear infinite, blurIn 0.3s ease-out;
}

@keyframes blurIn {
    0% {
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

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

/* Search results */
.search-results {
    margin-top: 30px;
}

.results-container {
    max-width: 100%;
}

/* Results summary that fades under search box */
.results-summary {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.results-count {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.results-count strong {
    color: #000;
    font-weight: 700;
}

/* Risk alert styling */
.risk-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #d97706;
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.alert-icon {
    stroke: #d97706;
    flex-shrink: 0;
}

.risk-details-btn {
    background: #d97706;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.risk-details-btn:hover {
    background: #b45309;
    transform: translateY(-1px);
}

/* Risk modal styling */
.risk-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.risk-modal {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.risk-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
}

.modal-header-content {
    flex: 1;
}

.risk-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    color: #000;
}

.modal-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    font-style: italic;
}

.risk-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.risk-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.risk-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    max-height: calc(85vh - 140px);
}

/* Briefing-style narrative display */
.narrative-briefing {
    margin-bottom: 30px;
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 25px;
}

.narrative-briefing:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.narrative-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.disinfo-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.disinfo-high { 
    background: #fee2e2; 
    color: #dc2626; 
}

.disinfo-medium { 
    background: #fef3c7; 
    color: #d97706; 
}

.disinfo-low { 
    background: #ecfdf5; 
    color: #059669; 
}

.risk-icon {
    flex-shrink: 0;
}

.narrative-rationale-brief {
    color: #666;
    font-style: italic;
    font-size: 15px;
    line-height: 1.5;
    margin: 12px 0 20px 0;
}

.narrative-freshness {
    color: #999;
    font-style: normal;
    font-weight: normal;
}

/* Admin AI Model Toggle Styles */
.admin-model-toggle {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
}

/* Admin AI Model Toggle for main page */
.admin-model-toggle-main {
    display: flex;
    align-items: center;
    margin-left: 20px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
}

/* Modern briefing button container */
.briefing-button-container {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modern briefing buttons - matching search interface style */
.modern-briefing-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.modern-briefing-btn:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.modern-briefing-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Icon containers */
.briefing-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Risk briefing - subtle red tint */
.risk-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.risk-briefing-btn:hover .risk-icon {
    background: rgba(239, 68, 68, 0.15);
}

/* Narratives briefing - neutral/blue tint */
.narratives-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.narratives-briefing-btn:hover .narratives-icon {
    background: rgba(59, 130, 246, 0.15);
}

/* Button text */
.briefing-text {
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Loading states */
.modern-briefing-btn.htmx-request {
    cursor: wait;
    opacity: 0.7;
}

.modern-briefing-btn.htmx-request .briefing-text {
    opacity: 0.6;
}

.modern-briefing-btn.htmx-request .briefing-icon-container {
    opacity: 0.6;
}

.model-toggle-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.model-toggle-label {
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.toggle-switch-wrapper {
    display: flex;
    align-items: center;
}

.toggle-switch {
    display: none;
}

.toggle-switch-label {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 28px;
    background-color: #ccc;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch:checked + .toggle-switch-label {
    background-color: #3b82f6;
}

.toggle-switch-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch:checked + .toggle-switch-label .toggle-switch-handle {
    transform: translateX(52px);
}

.toggle-switch-inner {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: bold;
    color: white;
    width: 100%;
    text-align: center;
}

.toggle-on {
    display: none;
}

.toggle-off {
    display: block;
}

.toggle-switch:checked + .toggle-switch-label .toggle-on {
    display: block;
}

.toggle-switch:checked + .toggle-switch-label .toggle-off {
    display: none;
}

.current-model-display {
    color: #3b82f6;
    font-size: 13px;
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

.briefing-article {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 15px;
}

.briefing-article:last-child {
    margin-bottom: 0;
}

.briefing-article strong {
    color: #000;
    font-weight: 600;
}

.briefing-article a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.briefing-article a:hover {
    color: #333;
    text-decoration: underline;
}

.shares-count {
    color: #d97706;
    font-weight: 600;
    font-size: 13px;
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 4px;
}

/* Email signup bar styling */
.email-signup-bar {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 20px 25px;
    border-top: 1px solid rgba(251, 191, 36, 0.2);
    margin-top: 0;
    flex-shrink: 0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.signup-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 100%;
}

.signup-text {
    color: #d97706;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.signup-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 350px;
}

.email-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #000;
    outline: none;
    transition: all 0.3s ease;
}

.email-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.email-input::placeholder {
    color: #666;
}

.send-button {
    padding: 10px 20px;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-radius: 6px;
    color: #d97706;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.send-button:hover {
    background: rgba(217, 119, 6, 0.2);
    border-color: rgba(217, 119, 6, 0.5);
    transform: translateY(-1px);
}

.send-button:active {
    transform: translateY(0);
}

/* Responsive design for signup bar */
@media (max-width: 600px) {
    .signup-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .signup-text {
        text-align: center;
    }
    
    .signup-form {
        max-width: none;
    }
}

.results-header {
    margin-bottom: 30px;
    text-align: center;
}

.results-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #000;
}

.sort-label {
    color: #666;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

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

/* Articles grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.article-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(0,0,0,0.02) 100%);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.article-header {
    margin-bottom: 15px;
}

.article-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.article-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #333;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #666;
    align-items: center;
}

.article-source {
    font-weight: 600;
}

.article-shares {
    gap: 4px;
    color: #ed6b2d;
    font-weight: 600;
}

.share-icon {
    flex-shrink: 0;
    stroke: #ed6b2d;
}

.article-image {
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    margin: 15px 0;
}

.article-body {
    line-height: 1.6;
    color: #333;
}

.article-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.read-more-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.read-more-button:hover {
    transform: translateX(3px);
}

.external-link-icon {
    flex-shrink: 0;
}

/* Error and empty states */
.error-message, .empty-state {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,0,0,0.02) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255,0,0,0.1);
}

.empty-state {
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(0,0,0,0.02) 100%);
    border: 1px solid rgba(0,0,0,0.1);
}

.error-icon, .empty-icon {
    margin: 0 auto 20px;
    color: #666;
}

.error-message h3, .empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.error-message p, .empty-state p {
    color: #666;
    font-size: 16px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #666;
    font-size: 14px;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 40px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .search-container {
        padding: 20px;
        margin: 0 10px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-button {
        min-width: auto;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-card {
        padding: 20px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 25px 0;
        margin: 15px 0;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .search-container {
        padding: 15px;
        margin: 0 5px;
    }
    
    .search-input, .search-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .article-card {
        padding: 15px;
    }
    
    .suggested-searches {
        gap: 8px;
        margin: 12px 0 8px;
    }
    
    .suggestion-btn {
        padding: 6px 12px;
        font-size: 13px;
        gap: 6px;
        border-radius: 4px;
    }
    
    .suggestion-logo {
        width: 18px;
        height: 18px;
    }
    
    .suggestion-logo svg {
        width: 16px;
        height: 16px;
    }
}

/* HTMX specific styles */
.htmx-indicator {
    opacity: 0;
    transition: opacity 500ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* ===== PRO COMPOSER STYLES ===== */

.pro-composer-intro {
    text-align: center;
    margin-bottom: 32px;
}

.pro-composer-intro h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 600;
    color: #111827;
}

.pro-composer-intro p {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
}

/* Pro Composer Search Styles */
.pro-composer-search {
    max-width: 1000px;
    margin: 0 auto;
}

.pro-composer-form {
    width: 100%;
}

.pro-composer-input-group {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.pro-composer-autocomplete {
    flex: 2;
    min-width: 400px;
}

.pro-composer-search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    transition: all 0.2s ease;
}

.pro-composer-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.pro-composer-search-button {
    padding: 16px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 58px;
}

.pro-composer-search-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Pro Composer Results Styles */
.pro-composer-results-container {
    margin-top: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.pro-composer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 16px;
}

.pro-composer-export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.pro-composer-export-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* List-style Articles */
.pro-composer-articles-list {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    overflow: hidden;
}

.pro-composer-article-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1.4;
}

.pro-composer-article-item:last-child {
    border-bottom: none;
}

.pro-composer-article-item:hover {
    background: #f9fafb;
}

.article-favicon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
}

.favicon-placeholder {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9ca3af;
}

.article-source {
    font-weight: 600;
    color: #111827;
    flex-shrink: 0;
}

.article-headline {
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
    flex: 1;
    min-width: 0;
}

.article-headline:hover {
    color: #3b82f6;
}

.article-shares {
    color: #ea580c;
    font-weight: 500;
    flex-shrink: 0;
}

.article-date {
    color: #9ca3af;
    flex-shrink: 0;
}

/* No results state */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-results svg {
    margin-bottom: 16px;
    color: #d1d5db;
}

.no-results h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #374151;
}

.no-results p {
    margin: 0;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pro-composer-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pro-composer-autocomplete {
        min-width: auto;
    }
    
    .pro-composer-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .pro-composer-article-item {
        padding: 12px 16px;
    }
}

/* User prompt styles for narratives briefing */
.narratives-button-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.user-prompt-container {
    position: relative;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.narratives-button-container:hover .user-prompt-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Keep visible while focused, even without JS */
.narratives-button-container:focus-within .user-prompt-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-prompt-container.locked {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.user-prompt-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.user-prompt-input:focus {
    border-color: #000;
    background: #fff;
    outline: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.user-prompt-input::placeholder {
    color: #999;
    font-style: italic;
}

.prompt-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    margin-bottom: 5px;
    z-index: 1000;
}

.prompt-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0,0,0,0.8);
}

.narratives-button-container:hover .prompt-tooltip {
    opacity: 1;
    visibility: visible;
}

.user-prompt-container.locked .prompt-tooltip {
    display: none;
}

@media (max-width: 768px) {
    .narratives-button-container {
        gap: 12px;
    }
    
    .user-prompt-input {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .prompt-tooltip {
        font-size: 11px;
        padding: 4px 8px;
    }
}

.search-button:focus {
    outline-color: #fff;
}

/* Pro Modal Styles */
.pro-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
    padding: 20px;
    box-sizing: border-box;
}

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

.pro-modal {
    background: linear-gradient(135deg, rgba(20,20,20,0.98) 0%, rgba(40,40,40,0.95) 50%, rgba(15,15,15,0.98) 100%);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    transform: scale(0.95);
    animation: modalSlideIn 0.3s ease-out 0.1s forwards;
    position: relative;
}

@keyframes modalSlideIn {
    to {
        transform: scale(1);
    }
}

.pro-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.pro-modal-header-logo {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, rgba(10,10,10,0.95) 0%, rgba(40,40,40,0.9) 30%, rgba(60,60,60,0.8) 70%, rgba(20,20,20,0.95) 100%);
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pro-modal-header-logo::after {
    content: "";
    position: absolute;
    inset: -1px;
    background: conic-gradient(
        from var(--gradient-angle),
        rgba(100, 100, 100, 0.3),
        rgba(150, 150, 150, 0.4),
        rgba(200, 200, 200, 0.5),
        rgba(180, 180, 180, 0.4),
        rgba(120, 120, 120, 0.3),
        rgba(150, 150, 150, 0.4),
        rgba(100, 100, 100, 0.3)
    );
    border-radius: inherit;
    animation: rotateBorder 6s linear infinite;
    z-index: -1;
}

@keyframes rotateBorder {
    0% {
        --gradient-angle: 0deg;
    }
    100% {
        --gradient-angle: 360deg;
    }
}

.pro-modal-header-logo .logo-container {
    flex: 1;
    text-align: center;
}

.logo-inverted {
    filter: invert(1) brightness(1.2);
    height: 50px;
    width: auto;
}

.brand-subtitle-white {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    font-weight: 500;
    margin: 8px 0 0 0;
    letter-spacing: 0.5px;
}

.pro-modal-header-logo .pro-modal-close {
    color: white;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    position: relative;
    z-index: 10;
}

.pro-modal-header-logo .pro-modal-close:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.pro-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin: 0;
    line-height: 1.2;
}

.pro-modal-close {
    background: none;
    border: none;
    font-size: 30px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pro-modal-close:hover {
    background: rgba(0,0,0,0.1);
    color: #000;
}

.pro-modal-body {
    padding: 25px;
}

.pro-offer-header {
    margin-bottom: 20px;
}

.pro-offer-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
}

.pro-offer-subtitle {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.5;
    margin: 0;
}

.pro-description {
    margin-bottom: 25px;
}

.pro-description p {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.pro-features {
    margin-bottom: 20px;
}

.pro-features h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px 0;
}

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

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-icon {
    font-size: 18px;
    font-weight: bold;
    color: #059669;
    margin-top: 2px;
    min-width: 20px;
    flex-shrink: 0;
}

.feature-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ddd;
}

.feature-content strong {
    color: #fff;
}

.pro-deliverables {
    margin-bottom: 25px;
}

.pro-deliverables h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 10px 0;
}

.deliverables-list {
    margin: 0;
    padding-left: 20px;
}

.deliverables-list li {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 5px;
}

.pro-bonus {
    background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(255,165,0,0.15) 100%);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    position: relative;
}

.bonus-badge {
    font-size: 1rem;
    font-weight: 600;
    color: #ff8800;
    margin-bottom: 4px;
    display: block;
}

.bonus-subscription-note {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 12px;
    font-style: italic;
}

.bonus-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bonus-item {
    color: #ddd;
    line-height: 1.6;
    font-weight: 500;
    font-size: 0.95rem;
}

.bonus-item strong {
    color: #fff;
}

.pro-bonus p {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

.pro-pricing {
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.pricing-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-item, .target-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.price-label, .target-label {
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
}

.target-value {
    color: #333;
    line-height: 1.4;
}

.pro-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.pro-action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
}

.pro-action-btn.primary {
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.pro-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #1a1a1a 0%, #444 100%);
}

.pro-action-btn.secondary {
    background: rgba(255,255,255,0.9);
    color: #000;
    border: 2px solid #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pro-action-btn.secondary:hover {
    transform: translateY(-2px);
    background: #000;
    color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Modal responsive design */
@media (max-width: 768px) {
    .pro-modal {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .pro-modal-header, .pro-modal-body {
        padding: 20px;
    }
    
    .pro-modal-title {
        font-size: 1.5rem;
    }
    
    .pro-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pro-action-btn {
        min-width: auto;
        width: 100%;
    }
    
    .pricing-details {
        gap: 8px;
    }
    
    .price-item, .target-item {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .pro-modal-overlay {
        padding: 10px;
    }
    
    .pro-modal {
        margin: 0;
        max-width: 100%;
        border-radius: 15px;
    }
    
    .pro-modal-header, .pro-modal-body {
        padding: 15px;
    }
    
    .pro-modal-title {
        font-size: 1.3rem;
    }
    
    .feature-item {
        gap: 8px;
    }
    
    .feature-content, .deliverables-list li, .pro-bonus p {
        font-size: 0.9rem;
    }
}

/* Waitlist Form Styles */
.waitlist-form-top {
    background: rgba(60, 60, 60, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.waitlist-form {
    background: rgba(248, 250, 252, 0.7);
    border-radius: 15px;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid rgba(0,0,0,0.08);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    color: #fff;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.2);
}

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

.pro-action-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* PRO Tier Badge and Button Styles */
.pro-badge, .pro-pill {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
    display: inline-block;
    vertical-align: middle;
}

.upgrade-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #000 !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
}

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

.get-pro-btn {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
}

.get-pro-btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.login-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.login-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Navigation PRO tab styles */
.nav-tab-pro {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    cursor: pointer;
}

.nav-tab-pro:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%) !important;
    border-color: rgba(255, 215, 0, 0.5) !important;
}

/* Date and country selector PRO enhancements */
.date-selector-wrapper, .country-selector-wrapper {
    position: relative;
}

.date-selector:disabled, .country-selector option:disabled {
    color: #999 !important;
    background: #f5f5f5 !important;
}

/* Pro badge positioning for selectors */
.date-selector-wrapper .pro-badge,
.country-selector-wrapper .pro-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.6rem;
    padding: 1px 4px;
    z-index: 10;
}
}

.btn-loading {
    display: none;
}

.success-message {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(34, 197, 94, 0.4);
}

.success-message h4 {
    color: #22c55e;
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.success-message p {
    color: #bbf7d0;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .waitlist-form {
        padding: 20px;
        margin-top: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input {
        padding: 10px 14px;
    }
    
    .success-message {
        padding: 25px 15px;
    }
    
    .success-message h4 {
        font-size: 1.2rem;
    }
}

/* TikTok Analysis Button Styles */
.analysis-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
    margin: 16px 0;
}

.tiktok-briefing-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    margin-bottom: 16px;
}

.tiktok-briefing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

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

/* Text-based Loading Animation */
.text-loading-indicator {
    display: none;
    padding: 20px 0;
}

.text-loading-indicator.htmx-request {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.breathing-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(10,10,10,0.8) 0%, rgba(40,40,40,0.6) 30%, rgba(60,60,60,0.4) 60%, rgba(20,20,20,0.2) 80%, transparent 100%);
    animation: breathe 2s ease-in-out infinite;
    flex-shrink: 0;
    filter: blur(0.5px);
}

.loading-text {
    color: #999;
    font-size: 14px;
    font-weight: 400;
    animation: shimmer 3s linear infinite;
    background: linear-gradient(-90deg, #999 0%, #fff 50%, #999 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Professional List Layout Styles */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 20px;
}

.article-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 5px, 15px,;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.article-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.article-image-container {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.article-image {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.favicon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.favicon-overlay img, .favicon-overlay svg {
    width: 32px;
    height: 32px;
    filter: none; /* Override grayscale filter */
    background: rgba(255, 255, 255, 0.95);
}

.favicon-overlay svg {
    color: #666;
}

.article-favicon-only {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.article-favicon-only img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.article-favicon-only svg {
    color: #666;
    width: 24px;
    height: 24px;
}

.article-content {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.article-text {
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 2px;
}

.article-body-line {
    font-size: 15px;
    color: #333;
    line-height: 1.4;
}

.article-item .article-source {
    font-weight: 600;
    color: #000;
    text-decoration: none;
    font-size: 15px;
}

.article-item .article-source:hover {
    text-decoration: underline;
}

.article-item .article-title {
    color: #000;
    text-decoration: none;
    font-weight: normal;
    font-size: 15px;
}

.article-item .article-title:hover {
    text-decoration: underline;
}

.article-item .article-shares {
    color: #ed6b2d;
    font-weight: 500;
    font-size: 15px;
}

.article-snippet {
    color: #666;
    font-size: 15px;
}

.article-item .article-date {
    color: #999;
    font-size: 14px;
}

.sort-label {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin: 0;
}

/* Results summary styling for list view */
.results-summary {
    text-align: center;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease-out;
}

.results-summary .results-count {
    font-size: 15px;
    color: #666;
    margin: 0 0 8px 0;
}

.results-summary .results-count strong {
    color: #000;
    font-weight: 700;
}

/* Mobile responsiveness for list view */
@media (max-width: 768px) {
    .article-item {
        padding: 3px 3px;
        gap: 10px;
    }
    
    .article-image-container {
        width: 50px;
        height: 50px;
    }
    
    .article-image {
        width: 50px;
        height: 50px;
    }
    
    .article-favicon-only {
        width: 50px;
        height: 50px;
    }
    
    .article-title-line {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
        margin-bottom: 2px;
    }
    
    .article-item .article-shares {
        margin-left: 0;
        order: 3;
    }
    
    .article-item .article-title {
        font-size: 15px;
        line-height: 1.2;
        order: 2;
    }
    
    .article-item .article-source {
        order: 1;
    }
    
    .article-snippet {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .article-item .article-meta {
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 3px;
    }
    
    .favicon-overlay img, .favicon-overlay svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .article-item {
        padding: 12px;
        gap: 8px;
    }
    
    .article-item .article-title {
        font-size: 14px;
    }
    
    .article-snippet {
        font-size: 12px;
    }
}

/* ========== TIKTOK PAGE STYLES ========== */

/* TikTok List Section */
.tiktok-list-section {
    margin: 10px 0;
}

.error-section {
    margin: 30px 0;
    background: linear-gradient(135deg, rgba(255,240,240,0.8) 0%, rgba(255,250,250,0.9) 50%, rgba(255,245,245,0.8) 100%);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255,0,0,0.1);
    box-shadow: 0 4px 16px rgba(255,0,0,0.1);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

.list-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-title svg {
    color: #ff0050;
}

.total-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Dense TikTok List */
.tiktok-dense-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tiktok-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    line-height: 1.4;
}

.tiktok-item:hover {
    background: rgba(255,255,255,1);
    border-color: rgba(0,0,0,0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tiktok-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tiktok-stats-line {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.video-text {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.stats {
    color: #666;
    font-size: 15px;
    flex: 1;
    font-weight: 500;
}

#tiktok-results .results-summary {
    text-align: center;
    margin: 20px 0;
    animation: fadeInUp 0.6s ease-out;
}

#tiktok-results .results-count {
    font-size: 14px;
    color: #666;
    margin: 0;
}

#tiktok-results .results-count strong {
    color: #000;
    font-weight: 700;
}

#tiktok-results .sort-label {
    font-size: 12px;
    color: #888;
    margin: 4px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .tiktok-title-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .tiktok-stats-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .video-text {
        max-width: 100%;
    }
}

.channel-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 12px;
    flex-shrink: 0;
}

.channel-name {
    font-weight: 600;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.2;
}

.username {
    color: #666;
    font-weight: 400;
    font-size: 11px;
    white-space: nowrap;
    margin-left: 8px;
}

.video-text {
    color: #333;
    flex: 1;
    min-width: 200px;
}

.stats {
    color: #555;
    font-size: 14px;
    white-space: nowrap;
}

.engagement {
    color: #ff8c00;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.watch-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #8e8e8e 0%, #b3b3b3 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.watch-btn:hover {
    background: linear-gradient(135deg, #757575 0%, #9e9e9e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.watch-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.watch-btn-small:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Export button */
.export-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.export-btn svg {
    flex-shrink: 0;
}

/* Mobile Responsive for TikTok Dense List */
@media (max-width: 768px) {
    .tiktok-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 16px;
    }
    
    .tiktok-item > * {
        width: 100%;
    }
    
    .stats, .engagement {
        font-size: 12px;
    }
    
    .watch-btn {
        align-self: flex-end;
        margin-top: 8px;
    }
    
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .list-title {
        font-size: 20px;
    }
}

.update-time {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Video Cards */
.video-card {
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.video-card.featured {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,248,248,0.9) 100%);
    border: 2px solid rgba(255,0,80,0.2);
    box-shadow: 0 8px 24px rgba(255,0,80,0.1);
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 12px;
    line-height: 1.4;
}

.video-creator {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-creator strong {
    color: #000;
    font-weight: 600;
}

.username {
    color: #666;
    font-weight: 500;
}

.video-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    font-size: 14px;
}

.stat-item svg {
    color: #ff0050;
}

.stat-number {
    font-weight: 700;
    color: #000;
}

.stat-label {
    color: #666;
    font-size: 12px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 13px;
    color: #666;
}

.engagement-rate {
    font-weight: 600;
    color: #ff0050;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #ff0050 0%, #ff4080 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.video-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,0,80,0.3);
    background: linear-gradient(135deg, #e6004a 0%, #ff3477 100%);
}

/* Video Grid for Search Results */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Search Filters */
.search-filters {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #000;
    min-width: 120px;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #ff0050;
    box-shadow: 0 0 0 3px rgba(255,0,80,0.1);
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

.results-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-title svg {
    color: #ff0050;
}

.results-info {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.results-count {
    font-weight: 600;
    color: #000;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(40,40,40,0.9) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(50,50,50,1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.pagination-info {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #000;
}

.no-results p {
    font-size: 16px;
    color: #666;
}

/* Responsive Design for TikTok Page */
@media (max-width: 768px) {
    .featured-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .featured-title {
        font-size: 20px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-stats {
        gap: 15px;
    }
    
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .filter-select {
        min-width: 140px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Skeleton Loading Animations for Autocomplete */
.skeleton-loading {
    opacity: 0.8;
}

.suggestion-item.skeleton {
    pointer-events: none;
    cursor: default;
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton .suggestion-icon.skeleton-shimmer {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.skeleton .suggestion-label.skeleton-shimmer {
    height: 16px;
    width: 120px;
    margin-bottom: 4px;
}

.skeleton .suggestion-type.skeleton-shimmer {
    height: 12px;
    width: 80px;
}

.skeleton .suggestion-score.skeleton-shimmer {
    width: 45px;
    height: 20px;
    border-radius: 10px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Remove conflicting autocomplete dropdown rule */

.autocomplete-dropdown {
    transition: opacity 0.2s ease-in-out;
}


/* =================================================================
   LAYOUT ARCHITECTURE STYLES 
   Added for template restructuring to support flexible layouts
   ================================================================= */

/* Base Layout Structure */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    /* Unified header styling - inherits from .header */
}

.app-navigation {
    /* Navigation container - position agnostic */
}

.app-main {
    flex: 1;
    /* Main content area */
}

/* Layout Variants */
.layout-topnav .app-navigation {
    /* Top navigation specific styles - current default */
    margin: 20px 0 30px;
}

.layout-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr;
}

.layout-sidebar .app-header {
    grid-column: 1 / -1;
}

.layout-sidebar .app-navigation {
    /* Sidebar navigation specific styles */
    grid-column: 1;
    grid-row: 2;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.01) 100%);
    border-right: 1px solid rgba(0,0,0,0.1);
    height: 100%;
    overflow-y: auto;
}

.layout-sidebar .app-navigation .navigation-tabs {
    flex-direction: column;
    gap: 8px;
}

.layout-sidebar .app-navigation .nav-tab {
    width: 100%;
    justify-content: flex-start;
}

.layout-sidebar .app-main {
    grid-column: 2;
    grid-row: 2;
    padding: 20px 30px;
}

/* Tier-based Theme Modifiers */
body.tier-public .app-header {
    /* Public tier header styling */
}

body.tier-free .app-header {
    /* Free tier header styling - uses header-free class */
}

body.tier-paid .app-header {
    /* Paid tier header styling - default header class */
}

/* Responsive Layout Adjustments */
@media (max-width: 768px) {
    .layout-sidebar {
        grid-template-columns: 1fr;
    }
    
    .layout-sidebar .app-navigation {
        display: none; /* Will need hamburger menu for mobile */
    }
    
    .layout-sidebar .app-main {
        grid-column: 1;
    }
}

/* Smooth Transitions for Layout Changes */
.app-layout,
.app-navigation,
.app-main {
    transition: all 0.3s ease;
}


/* =================================================================
   SIDEBAR LAYOUT STYLES 
   Specific styling for the sidebar layout variant
   ================================================================= */

/* Sidebar Container */
.layout-sidebar-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

/* Sidebar Styling */
.app-sidebar {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #fff;
    padding: 0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.sidebar-logo {
    width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
}

.sidebar-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Sidebar User Info */
.sidebar-user-info {
    padding: 15px 0;
}

.sidebar-welcome {
    margin-bottom: 10px;
}

.sidebar-welcome .welcome-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    display: block;
}

.sidebar-welcome .welcome-text strong {
    color: #fff;
    font-weight: 600;
}

.sidebar-welcome .company-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-top: 4px;
}

/* Sidebar User Actions */
.sidebar-user-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.sidebar-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Sidebar Navigation */
.sidebar-navigation {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav-item.active {
    background: rgba(255, 140, 0, 0.2);
    color: #ff8c00;
    border-left: 3px solid #ff8c00;
}

.sidebar-nav-item.active svg {
    stroke: #ff8c00;
}

.sidebar-nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sidebar-nav-item.disabled:hover {
    background: none;
    color: rgba(255, 255, 255, 0.7);
}

/* Badges in Sidebar */
.coming-soon-badge,
.bespoke-badge {
    margin-left: auto;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
    font-weight: 600;
}

.coming-soon-badge {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.bespoke-badge {
    background: rgba(255, 140, 0, 0.2);
    color: #ff8c00;
    border: 1px solid rgba(255, 140, 0, 0.3);
}

/* Sidebar Upgrade CTA */
.sidebar-upgrade-cta {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.upgrade-btn-sidebar {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-btn-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.4);
}

/* Content Wrapper */
.app-content-wrapper {
    margin-left: 250px;
    min-height: 100vh;
    background: #fff;
}

/* Mobile Top Bar (hidden on desktop) */
.mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* Main Content in Sidebar Layout */
.layout-sidebar-container .app-main {
    padding: 30px 40px;
    max-width: 1200px;
}

/* Responsive Design for Sidebar */
@media (max-width: 768px) {
    .layout-sidebar-container {
        grid-template-columns: 1fr;
    }
    
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .app-sidebar.sidebar-open {
        transform: translateX(0);
    }
    
    .app-content-wrapper {
        margin-left: 0;
    }
    
    .app-content-wrapper.sidebar-expanded {
        transform: translateX(250px);
    }
    
    .mobile-topbar {
        display: block;
    }
}

/* Adjust search container for sidebar layout */
.layout-sidebar-container .search-container {
    max-width: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(250,250,250,0.95) 100%);
}

/* Adjust header elements when in sidebar (header not shown in sidebar layout) */
body.tier-public.layout-sidebar .app-header,
body.tier-free.layout-sidebar .app-header,
body.tier-paid.layout-sidebar .app-header {
    display: none;
}

/* Hide top navigation when in sidebar layout */
body.layout-sidebar .app-navigation {
    display: none;
}

/* Smooth transitions between layouts */
.app-layout,
.app-sidebar,
.app-content-wrapper {
    transition: all 0.3s ease;
}

/* =================================================================
   REDESIGNED SIDEBAR LAYOUT WITH SLIM TOPBAR
   Clean sidebar navigation with slim top bar design
   ================================================================= */

/* Override container constraints for sidebar layout */
body.layout-sidebar {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.layout-sidebar .container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Sidebar Layout Wrapper */
.sidebar-layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100vw;
    background-color: #fff;
    position: relative;
}

/* Slim Top Navigation Bar */
.slim-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    background: linear-gradient(167deg, rgba(0, 0, 0, 0.05) 0%, rgba(255, 255, 255, 0.10) 100%);
    box-shadow: 0px 1px 0px 1px rgba(255, 255, 255, 0.20) inset;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(5px);
    margin: 20px 20px 0;
    z-index: 100;
    width: calc(100% - 40px);
    height: 65px;
}

.slim-topbar-left {
    display: flex;
    align-items: center;
}

.slim-topbar-logo {
    height: 49px;
    width: 120px;
    border-radius: 8px;
}

.slim-topbar-center {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slim-topbar-tagline {
    font-size: 14.5px;
    color: #555555;
    font-weight: 400;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    padding-bottom: 2px;
    border-bottom: 1px solid #FF6B35;
}

.slim-topbar-tagline::after {
    content: ' |';
    color: #FF6B35;
    font-size: 15.88px;
    margin-left: 4px;
}

.slim-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Reuse existing button styles for slim topbar */
.slim-topbar-right .admin-link,
.slim-topbar-right .logout-link,
.slim-topbar-right .login-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 17px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 8px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    cursor: pointer;
}

.slim-topbar-right .admin-link:hover,
.slim-topbar-right .logout-link:hover,
.slim-topbar-right .login-link:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.slim-topbar-right .admin-link svg,
.slim-topbar-right .logout-link svg,
.slim-topbar-right .login-link svg {
    width: 16px;
    height: 16px;
    stroke: #666;
}

.slim-topbar-right .get-pro-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 17px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 8px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    cursor: pointer;
}

.slim-topbar-right .get-pro-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.slim-topbar-right .get-pro-btn svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
}

/* Sidebar Content Container */
.sidebar-content-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    width: 100%;
}

/* Left Sidebar Navigation */
.sidebar-nav {
    width: 375px;
    background: transparent;
    padding: 20px 10px;
    overflow-y: auto;
}

.sidebar-nav-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 3px;
    align-items: flex-end;
}

/* Sidebar Navigation Items */
.sidebar-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 21px;
    background: white;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.10);
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 49px;
    white-space: nowrap;
    width: auto;
}

.sidebar-nav-item:hover:not(.sidebar-nav-item-disabled) {
    box-shadow: 0px 2px 6px rgba(255, 140, 0, 0.2);
    border-color: rgba(255, 140, 0, 0.5);
    transform: translateY(-2px);
}

.sidebar-nav-item.active {
    background: linear-gradient(155deg, rgba(255, 140, 0, 0.10) 0%, rgba(255, 140, 0, 0.05) 100%);
    box-shadow: 0px 2px 8px rgba(255, 140, 0, 0.20);
    border-color: #FF8C00;
    color: #FF8C00;
    font-weight: 500;
}

.sidebar-nav-item.active svg {
    stroke: #FF8C00;
}

.sidebar-nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-nav-item span:first-of-type {
    flex: 1;
}

/* Pro Search Item - styled like regular items, not highlighted */
.sidebar-nav-item-pro {
    /* Removed special styling - now uses default .sidebar-nav-item styles */
}

/* Locked Pro Item (for non-paid users) */
.sidebar-nav-item-locked {
    background: #f8f8f8;
    border-color: rgba(0, 0, 0, 0.1);
    opacity: 0.8;
}

.sidebar-nav-item-locked:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Disabled Items */
.sidebar-nav-item-disabled {
    background: #F8F8F8;
    color: #999999;
    cursor: not-allowed;
    border-color: #E8E8E8;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.10);
}

.sidebar-nav-item-disabled:hover {
    transform: none;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.10);
    border-color: #E8E8E8;
}

.sidebar-nav-item-disabled svg {
    stroke: #CCCCCC;
}

/* Badges for Sidebar Items */
.pro-badge-sidebar {
    display: inline-block;
    padding: 2px 6px;
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.3px;
    margin-left: auto;
}

.coming-soon-badge-sidebar {
    display: inline-block;
    padding: 2px 6px;
    background: #F0F0F0;
    color: #666666;
    font-size: 10px;
    font-weight: 400;
    border-radius: 4px;
    margin-left: auto;
    white-space: nowrap;
}

.bespoke-badge-sidebar {
    display: inline-block;
    padding: 2px 6px;
    background: #FFF4E6;
    color: #E67E22;
    font-size: 10px;
    font-weight: 400;
    border-radius: 4px;
    margin-left: auto;
}

/* Main Content in Sidebar Layout */
.sidebar-main-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
    background: #fff;
    width: 100%;
}

/* Responsive Design for Sidebar */
@media (max-width: 768px) {
    .slim-topbar {
        padding: 10px 15px;
    }
    
    .slim-topbar-tagline {
        display: none;
    }
    
    .slim-topbar-logo {
        height: 28px;
    }
    
    .sidebar-nav {
        position: fixed;
        left: 0;
        top: 57px;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 90;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-nav.sidebar-mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-main-content {
        padding: 20px 15px;
    }
}

/* Footer in Sidebar Layout */
.sidebar-layout-wrapper .sidebar-footer {
    text-align: center;
    padding: 30px 20px;
    color: #666666;
    font-size: 13.78px;
    font-family: Roboto, sans-serif;
    font-weight: 400;
    line-height: 22.40px;
    border-top: 1px solid rgba(0, 0, 0, 0.10);
    margin-top: 40px;
    grid-column: 1 / -1;
    width: 100%;
}
