/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent zoom on input focus on iOS */
input,
textarea,
select {
    font-size: 16px;
    -webkit-appearance: none;
    border-radius: 0;
}

/* ===== LAYOUT & CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
    overflow: visible;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 60px;
    width: auto;
    margin-right: 15px;
    margin-left: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

/* Hide mobile menu elements on desktop */
.mobile-menu-header,
.mobile-menu-close,
.mobile-menu-content {
    display: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

/* Legacy profile dropdown removed - now using sidebar user info section */

/* ===== USER INFO & AUTH ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.username {
    color: #667eea;
    font-weight: 600;
}

.logout-btn {
    background: #8e9aaf;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: #7a8691;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-signin {
    background: transparent;
    color: #667eea;
    padding: 0.5rem 1.5rem;
    border: 2px solid #667eea;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-signin:hover {
    background: #667eea;
    color: white;
}

.btn-signup {
    background: #667eea;
    color: white;
    padding: 0.5rem 1.5rem;
    border: 2px solid #667eea;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-signup:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
    transform: translateY(-2px);
}

/* ===== BACKGROUND GRADIENTS ===== */
body.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.light-bg {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* ===== AUTHENTICATION PAGES ===== */
.auth-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin-top: 80px;
}

/* ===== EMAIL VERIFICATION PAGE ===== */
.email-verification .bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.email-verification .card {
    border-radius: 1rem;
    overflow: hidden;
}

.email-verification .card-header {
    border-bottom: none;
}

.email-verification .card-header h2 {
    color: #333 !important;
}

.email-verification .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.email-verification .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.email-verification .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.email-verification .bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
}

.email-verification .text-primary {
    color: #667eea !important;
}

.email-verification .fa-envelope-open {
    color: #667eea;
    margin-bottom: 2rem !important;
}

/* Icon spacing improvements */
.email-verification .fa-envelope-open.fa-4x {
    margin-bottom: 2.5rem !important;
}

/* Text spacing improvements */
.email-verification .h5.text-primary.mb-3 {
    margin-bottom: 2rem !important;
    font-size: 1.3rem !important;
}

.email-verification .text-muted.mb-2 {
    margin-bottom: 1.5rem !important;
}

.email-verification .text-muted.mb-3 {
    margin-bottom: 2rem !important;
}

/* Link spacing */
.email-verification .text-decoration-none.fw-bold {
    font-size: 1.05rem !important;
    padding: 0.5rem 0 !important;
}

/* Enhanced spacing for email verification page */
.email-verification .card-body {
    padding: 4rem !important;
}

.email-verification .card-header {
    padding: 2.5rem 2rem !important;
}

.email-verification .form-control-lg {
    min-height: 70px;
    font-size: 1.2rem !important;
    letter-spacing: 0.2rem !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 2rem !important;
}

.email-verification .form-control-lg::placeholder {
    font-size: 1.1rem;
    color: #6c757d;
    opacity: 0.8;
}

/* Additional spacing improvements */
.email-verification .bg-light {
    padding: 2rem !important;
    margin: 2rem 0 !important;
}

.email-verification .text-center.mb-5 {
    margin-bottom: 3rem !important;
}

.email-verification .mb-4 {
    margin-bottom: 2.5rem !important;
}

.email-verification .mb-3 {
    margin-bottom: 2rem !important;
}

.email-verification .mb-2 {
    margin-bottom: 1.5rem !important;
}

.email-verification .pt-5 {
    padding-top: 3rem !important;
}

.email-verification .py-4 {
    padding: 2rem 0 !important;
}

.email-verification .py-5 {
    padding: 2.5rem 0 !important;
}

/* Form label spacing */
.email-verification .form-label.fw-bold.text-dark.mb-3 {
    margin-bottom: 1.5rem !important;
    font-size: 1.1rem !important;
}

/* Button spacing */
.email-verification .btn.btn-primary.btn-lg.py-4 {
    padding: 1.5rem 2rem !important;
    margin-top: 1rem !important;
    font-size: 1.1rem !important;
}

.alert {
    margin-bottom: 2rem;
}

.text-muted {
    line-height: 1.6;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    width: 100%;
    background: #667eea;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ===== FLASH MESSAGES ===== */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    padding: 5rem 0 4rem;
    color: #333;
    background: #ffffff;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #555;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #444;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-tagline {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: #667eea;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hero-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.hero-btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.hero-btn-secondary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: 4rem 0;
    background: #f8f9fa;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1a1a2e;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ===== WELCOME SECTION ===== */
.welcome-section {
    text-align: center;
    padding: 4rem 0;
    color: white;
}

.welcome-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.welcome-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ===== FEEDS PAGE ===== */
.main-content {
    padding: 0.5rem 0 2rem 0;
}

.loading-section {
    text-align: center;
    color: #333;
    padding: 3rem 0;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-section {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    color: #333;
}

.error-section h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.warning-section {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    color: #333;
}

.warning-section h3 {
    color: #ff8c00;
    margin-bottom: 1rem;
}

.warning-note {
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.feeds-content {
    padding: 0;
}

.preferences-summary {
    color: #666;
    padding: 0.2rem 0 0.6rem 0;
    margin-bottom: 0.8rem;
    margin-top: 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.preferences-summary::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    opacity: 0.6;
}

.preferences-summary h3 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feeds .preferences-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feeds .tag-chip {
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #666;
    border: 1px solid #ddd;
}

.feeds .preference-tag {
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #666;
    border: 1px solid #ddd;
}

.summary-section {
    margin-bottom: 2rem;
}

.summary-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.summary-content {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    line-height: 1.8;
    font-size: 1.1rem;
}

.news-list {
    margin-top: 2rem;
    padding: 0;
}

.news-list h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    padding: 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
}

.news-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    padding: 0.6rem 0;
    margin-bottom: 0;
    transition: background-color 0.2s ease;
    display: flex;
    gap: 1rem;
}

.news-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.news-image {
    flex-shrink: 0;
    width: 240px;
    height: 135px;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.news-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #667eea;
}

.news-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box !important;
    -webkit-line-clamp: 6 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden;
    text-overflow: ellipsis;
}


.news-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
}

.news-author {
    color: #667eea;
    font-weight: 500;
}

.news-date {
    color: #6c757d;
}

.news-source {
    color: #28a745;
    font-weight: 500;
    line-height: 1.2;
    vertical-align: baseline;
}

/* ===== NEWS ENTITIES ===== */
.news-entities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
    align-items: center;
}

.entity-tag {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.entity-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #e9ecef;
    border-color: #dee2e6;
}

.entity-tag:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ticker-tag {
    color: #2563eb;
    font-weight: 500;
    line-height: 1.2;
    vertical-align: baseline;
}

.ticker-link {
    text-decoration: none;
    background-color: #e0f2fe;
    padding: 0 0.35rem;
    border-radius: 3px;
    font-size: 0.7rem;
    line-height: 1.4;
    display: inline-block;
    transition: background-color 0.2s, color 0.2s;
    align-self: center;
    vertical-align: middle;
}

.ticker-link:hover {
    background-color: #2563eb;
    color: white;
    text-decoration: none;
}

.news-meta .ticker-link,
.news-meta .ticker-tag {
    align-self: center !important;
    height: fit-content !important;
    max-height: 1.5em !important;
    padding: 0.1rem 0.35rem !important;
    box-sizing: border-box !important;
}

.news-tickers {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin: 0.25rem 0;
    align-items: flex-start;
}

.refresh-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 0.8rem;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem auto;
    display: block;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
    transform: scale(1.05);
}

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== PREFERENCES PAGE ===== */
.page-header {
    text-align: center;
    padding: 2rem 0;
    color: white;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.main-content {
    padding: 0.5rem 0 2rem 0;
    min-height: 70vh;
}

.preferences-section,
.preferences-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

/* Ensure more categories fit in one row on larger screens */
@media (min-width: 768px) {
    .preferences-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.2rem;
    }
}

@media (min-width: 1024px) {
    .preferences-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1200px) {
    .preferences-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.8rem;
    }
}

/* Force more columns on very wide screens */
@media (min-width: 1400px) {
    .preferences-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.8rem;
    }
}

@media (min-width: 1600px) {
    .preferences-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.7rem;
    }
}

.preference-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.preference-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.preference-card.selected {
    border-color: #667eea;
    background: #e8f2ff;
}

.preference-card.selected::before {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}











.custom-preferences {
    margin-top: 2rem;
}

.custom-preference-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.input-button-group {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.input-button-group .autocomplete-container {
    flex: 1;
}

.input-button-group .btn {
    white-space: nowrap;
    margin-top: 0;
}

/* Auto-complete dropdown styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item.highlighted {
    background-color: #e8f2ff;
}

.suggestion-text {
    font-weight: 500;
    color: #333;
}

.autocomplete-more {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    background: #fafafa;
    text-align: center;
    cursor: default;
}


.custom-preference-info {
    background: #e8f2ff;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border-left: 4px solid #667eea;
}

.custom-preference-info h4 {
    color: #667eea;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.custom-preference-info p {
    color: #555;
    font-size: 0.85rem;
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.action-buttons {
    text-align: center;
    margin-top: 1.5rem;
}

.action-buttons .btn {
    margin: 0 0.4rem;
}


.selected-preferences {
    background: #e8f2ff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.selected-preferences h3 {
    color: #667eea;
    margin-bottom: 0.8rem;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.selected-tag {
    background: #667eea;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* ===== CUSTOM NOTIFICATIONS ===== */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.custom-notification-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-left: 4px solid #1e7e34;
}

.custom-notification-error {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
    border-left: 4px solid #c82333;
}

.custom-notification-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    border-left: 4px solid #e0a800;
}

.custom-notification-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
    border-left: 4px solid #138496;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.notification-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-content span {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
    flex-shrink: 0;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== FOOTER ===== */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

footer a {
    color: white;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Global mobile touch improvements */
    button,
    a,
    input,
    select,
    textarea {
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
        touch-action: manipulation;
    }

    /* Ensure minimum touch target size for interactive elements */
    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px;
        min-width: 44px;
    }

    /* Mobile Navigation - now inline */

    .nav-links {
        display: flex;
        list-style: none;
        gap: 1rem;
        align-items: center;
        margin: 0;
        padding: 0;
        position: relative;
        width: 100%;
        height: 100%;
        overflow: visible;
        padding-right: 80px;
    }

    /* Mobile navigation is now inline, no mobile menu needed */

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .auth-buttons a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }

    .username {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .logout-btn {
        width: 100%;
        justify-content: center;
    }

    /* Legacy profile dropdown mobile styles removed - using sidebar instead */

    .dropdown-item {
        border-radius: 0;
        margin: 0;
        border-bottom: 1px solid #eee;
        min-height: 48px;
        /* Ensure minimum touch target size */
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }

    /* Ensure dropdown items are easy to tap on mobile */
    .dropdown-item i {
        margin-right: 0.75rem;
        min-width: 20px;
        text-align: center;
    }

    .dropdown-divider {
        margin: 0;
        background: #eee;
    }

    /* Logo adjustments */
    .logo img {
        height: 45px;
        margin-right: 12px;
        margin-left: 8px;
        margin-top: 4px;
        margin-bottom: 4px;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    /* Hero section */
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hero-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        justify-content: center;
        min-height: 50px;
        font-size: 1rem;
    }

    /* Features section */
    .features h2 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* Welcome section */
    .welcome-section h1 {
        font-size: 2.2rem;
    }



    .feeds-content {
        padding: 0;
        margin: 1rem 0;
    }

    .feeds .preferences-list {
        justify-content: center;
        gap: 0.4rem;
    }

    .feeds .tag-chip {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .feeds .preference-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .news-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 0;
    }

    .news-image {
        width: 100%;
        height: 56.25vw;
        max-height: 300px;
        min-height: 200px;
    }

    .news-description {
        -webkit-line-clamp: 6 !important;
        font-size: 0.9rem;
    }

    .news-meta {
        display: block;
        font-size: 0.8rem;
    }

    .news-meta > * {
        display: inline;
        margin-right: 0.5rem;
    }

    .news-entities {
        gap: 0.4rem;
        margin: 0.4rem 0;
    }

    .entity-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
        max-width: 120px;
        border-radius: 4px;
    }

    .ticker-tag {
        font-size: 0.65rem;
        letter-spacing: 0.3px;
    }

    .ticker-link {
        padding: 0 0.25rem;
        font-size: 0.65rem;
        line-height: 1.2;
        align-self: center;
    }

    .news-tickers {
        gap: 0.2rem;
        margin: 0.15rem 0;
        align-items: flex-start;
    }

    .refresh-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 1rem;
        margin: 1rem auto;
        display: block;
    }

    /* Tags page */
    .page-header h1 {
        font-size: 1.8rem;
    }

    .preferences-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .preference-card {
        padding: 1.2rem;
        min-height: 120px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .action-buttons .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        min-height: 50px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Auth pages */
    .auth-container {
        margin: 60px 15px 20px 15px;
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .auth-header h1 {
        font-size: 1.8rem;
    }

    .form-group input {
        min-height: 50px;
        font-size: 1rem;
    }

    .submit-btn {
        min-height: 50px;
        font-size: 1rem;
    }

    /* Custom tags form */
    .input-button-group {
        flex-direction: column;
        gap: 1rem;
    }

    .input-button-group .btn {
        width: 100%;
        min-height: 50px;
        font-size: 1rem;
    }

    .custom-preference-form {
        padding: 1.2rem;
    }

    /* Selected tags */
    .selected-preferences {
        padding: 1.2rem;
    }

    .selected-tags {
        gap: 0.5rem;
    }

    .selected-tag {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    .remove-tag {
        min-width: 24px;
        min-height: 24px;
    }

    /* Summary section */
    .summary-content {
        padding: 1.2rem;
        font-size: 1rem;
    }

    /* Loading and error sections */
    .loading-section,
    .error-section,
    .warning-section {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo img {
        height: 35px;
    }

    .nav-links {
        width: 100%;
        right: -100%;
    }

    .auth-container {
        margin: 60px 10px 20px 10px;
        padding: 1.5rem 1rem;
    }

    .feeds-content {
        padding: 0;
    }

    .news-item {
        padding: 0.8rem 0;
    }

    .news-title {
        font-size: 1rem;
    }

    .news-image {
        height: 56.25vw;
        max-height: 250px;
        min-height: 180px;
    }

    .preference-card {
        padding: 1rem;
        min-height: 100px;
    }

    .custom-preference-form {
        padding: 1rem;
    }

    .selected-preferences {
        padding: 1rem;
    }
}

/* Ensure touch targets are large enough */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .btn-signin,
    .btn-signup,
    .logout-btn,
    .refresh-btn,
    .submit-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .preference-card {
        min-height: 60px;
    }

    .news-title a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Improve touch feedback */
    .btn:active,
    .btn-signin:active,
    .btn-signup:active,
    .logout-btn:active,
    .refresh-btn:active,
    .submit-btn:active,
    .preference-card:active {
        transform: scale(0.98);
    }

    /* Better scrolling on mobile */
    .nav-links {
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent text selection on buttons */
    .btn,
    .btn-signin,
    .btn-signup,
    .logout-btn,
    .refresh-btn,
    .submit-btn,
    .mobile-menu-btn,
    .preference-card {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* ===== FEEDS PAGE SPECIFIC STYLES ===== */
.feeds {
    /* All feeds-specific styles wrapped in this class */
}

.feeds .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.feeds .refresh-top-stories-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
}

.feeds .refresh-top-stories-btn:hover:not(:disabled) {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
    transform: scale(1.05);
}

.feeds .refresh-top-stories-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.feeds .refresh-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.feeds .refresh-top-stories-btn:hover:not(:disabled) .refresh-icon {
    transform: rotate(180deg);
}

.feeds .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 8px;
}

.feeds .loading-overlay p {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.feeds #top-stories-content {
    position: relative;
}

.feeds .channel-icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    object-fit: cover;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    padding: 1px;
}

.feeds .channel-name {
    font-size: 0.9em;
    color: #666;
}

.feeds .news-time-ago,
.feeds .news-ago {
    margin-left: 8px;
    color: #6c757d;
    line-height: 1.2;
    vertical-align: baseline;
}

/* Article Popup Styles */
.article-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.article-popup-content {
    background: white;
    border-radius: 0;
    max-width: 1400px;
    width: 95%;
    max-height: 95vh;
    height: 95vh;
    overflow-y: auto;
    box-shadow: none;
    animation: popupSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-100vh);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-popup-header {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    background: #f8f9fa;
}

.article-popup-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    padding-right: 2rem;
}

.popup-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close-btn:hover {
    background-color: #f8f9fa;
    color: #333;
}

.article-popup-body {
    padding: 2rem;
}

.popup-image {
    margin-bottom: 1.5rem;
    text-align: center;
}

.popup-image img {
    width: 400px;
    height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    object-position: center;
}

.feeds #popup-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.popup-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.popup-meta span {
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.popup-meta span:empty {
    display: none;
}

.popup-content-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.popup-content-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.popup-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    min-height: 100px;
}

.feeds .content-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-align: center;
}

.feeds .content-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.feeds .article-content {
    line-height: 1.6;
    color: #333;
}

.feeds .article-content p {
    margin-bottom: 1rem;
}

.feeds .article-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.feeds .article-content li {
    margin-bottom: 0.5rem;
}

.feeds .article-content em {
    color: #666;
    font-style: italic;
}

.feeds .article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    object-fit: contain;
}

.article-popup-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.popup-original-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.popup-original-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.popup-original-btn i {
    font-size: 0.9rem;
}

/* News item container - not clickable, only title is clickable */
.feeds .news-item {
    cursor: default;
    position: relative;
    max-width: 100%;
}

/* Make news title link clickable with pointer cursor */
.feeds .news-title-link {
    cursor: pointer;
}

.feeds .news-image {
    flex-shrink: 0;
    width: 280px;
    height: 158px;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
}

.feeds .news-item:hover {
    background-color: #f8f9fa;
}



/* Responsive adjustments for feeds */
@media (max-width: 1200px) {
    .article-popup-content {
        max-width: 95%;
        width: 95%;
    }
}

@media (max-width: 768px) {
    .article-popup-content {
        width: 98%;
        max-width: 98%;
        max-height: 95vh;
        height: 95vh;
    }

    .article-popup-header h2 {
        font-size: 1.2rem;
    }

    .popup-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .feeds .news-image {
        width: 240px;
        height: 135px;
    }
}

/* ===== WAITLIST STYLES ===== */
.waitlist-section {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.waitlist-section h2 {
    color: #1a1a2e;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.waitlist-section p {
    color: #444;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}



.waitlist-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.waitlist-input-group {
    display: flex;
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.waitlist-input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: 1px solid #333;
    border-radius: 50px;
    font-size: 1.1rem;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
}

.waitlist-input:focus {
    outline: none;
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.waitlist-input::placeholder {
    color: #666;
}

.waitlist-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 150px;
}

.waitlist-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.waitlist-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.waitlist-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.waitlist-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.waitlist-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.waitlist-message.show {
    opacity: 1;
    transform: translateY(0);
}

.waitlist-message.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.waitlist-message.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.beta-notice {
    background: #fff8e1;
    border: 1px solid #ffca28;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.beta-notice h3 {
    color: #f57c00;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.beta-notice p {
    color: #444;
    margin-bottom: 1rem;
}

.beta-notice .beta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Waitlist responsive styles */
@media (max-width: 768px) {
    .waitlist-input-group {
        flex-direction: column;
        align-items: center;
    }

    .waitlist-input {
        min-width: 100%;
        max-width: 300px;
    }

    .beta-notice .beta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== HOME PAGE SPECIFIC STYLES ===== */
body.home {
    background: #ffffff;
}

/* Flash Messages */
.home .flash-messages {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.home .flash-message {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
    animation: slideInDown 0.5s ease-out;
}

.home .flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.home .flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.home .flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== WAITLIST THANKS PAGE SPECIFIC STYLES ===== */
body.waitlist_thanks {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.waitlist_thanks .thanks-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 2rem;
}

.waitlist_thanks .thanks-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.waitlist_thanks .success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.waitlist_thanks .thanks-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

.waitlist_thanks .thanks-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.waitlist_thanks .thanks-email {
    background: linear-gradient(135deg, #e8f2ff 0%, #d1e7ff 100%);
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    font-size: 1.1rem;
    color: #333;
}

.waitlist_thanks .thanks-email strong {
    color: #667eea;
    font-weight: 700;
}

.waitlist_thanks .thanks-message {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    text-align: left;
}

.waitlist_thanks .thanks-message h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.waitlist_thanks .thanks-message p {
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.waitlist_thanks .action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.waitlist_thanks .btn {
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
    text-align: center;
}

.waitlist_thanks .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.waitlist_thanks .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.waitlist_thanks .btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.waitlist_thanks .btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.waitlist_thanks .social-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.waitlist_thanks .social-links p {
    color: #666;
    margin-bottom: 1rem;
}

.waitlist_thanks .social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.waitlist_thanks .social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.waitlist_thanks .social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Waitlist thanks responsive styles */
@media (max-width: 768px) {
    .waitlist_thanks .thanks-card {
        padding: 2rem;
        margin: 1rem;
    }

    .waitlist_thanks .thanks-title {
        font-size: 2rem;
    }

    .waitlist_thanks .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .waitlist_thanks .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ===== SETTINGS PAGE STYLES ===== */
.settings-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.settings-header {
    text-align: center;
    margin-bottom: 3rem;
}

.settings-header h1 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.settings-header p {
    color: #666;
    font-size: 1.1rem;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-section h2 i {
    color: #667eea;
}

.settings-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.setting-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: #667eea;
}

input:checked+.toggle-slider:before {
    transform: translateX(26px);
}

/* Settings responsive styles */
@media (max-width: 768px) {
    .settings-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .settings-header h1 {
        font-size: 2rem;
    }

    .settings-card {
        padding: 1rem;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .btn-secondary,
    .btn-danger {
        width: 100%;
        justify-content: center;
    }
}

/* ===== MARKETS PAGE STYLES ===== */
.markets-layout {
    display: flex;
    min-height: 100vh;
}

.markets-main-content {
    flex: 1;
    padding: 1rem 1.5rem 1.5rem 1rem;
}

.markets-content {
    padding: 0;
}

.markets-header {
    margin-bottom: 2rem;
}

.markets-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-title {
    color: #34495e;
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

/* Index cards - CNBC style */
.index-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.index-card {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.index-card:hover {
    opacity: 0.9;
}

.index-card.index-up {
    background-color: #006b54;
    color: white;
}

.index-card.index-down {
    background-color: #c41230;
    color: white;
}

.index-symbol {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.index-price {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.index-change {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.index-icon {
    font-size: 0.7rem;
}

.index-date {
    font-size: 0.65rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

/* ETF Tables - Seeking Alpha style */
.etf-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.etf-table {
    width: 100%;
    border-collapse: collapse;
}

.etf-table thead {
    background: #f8f9fa;
}

.etf-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 2px solid #dee2e6;
}

.etf-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.9rem;
}

.etf-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.etf-row:hover {
    background-color: #f8f9fa;
}

.etf-symbol {
    font-weight: 600;
    color: #3498db;
}

.etf-row:hover .etf-symbol {
    text-decoration: underline;
}

.etf-name {
    color: #6c757d;
}

.etf-table .positive {
    color: #006b54;
    font-weight: 500;
}

.etf-table .negative {
    color: #c41230;
    font-weight: 500;
}

/* Old market grid - keep for backwards compatibility */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.market-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.market-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.market-symbol {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2c3e50;
}

.market-name {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

.market-price {
    font-size: 1.75rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.market-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.market-change.positive {
    color: #27ae60;
}

.market-change.negative {
    color: #e74c3c;
}

.market-change-icon {
    font-size: 0.875rem;
}

.market-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.market-stat {
    font-size: 0.85rem;
}

.market-stat-label {
    color: #7f8c8d;
    display: block;
    margin-bottom: 0.25rem;
}

.market-stat-value {
    color: #2c3e50;
    font-weight: 600;
}

/* Stocks table styles */
.stocks-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.stocks-table {
    width: 100%;
    border-collapse: collapse;
}

.stocks-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stocks-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stocks-table th.text-right {
    text-align: right;
}

.stocks-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s;
}

.stocks-table tbody tr:hover {
    background-color: #f8f9fa;
}

.stocks-table tbody tr:last-child {
    border-bottom: none;
}

.stocks-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: #2c3e50;
}

.stocks-table td.text-right {
    text-align: right;
}

.stocks-table .stock-symbol {
    font-weight: 700;
    color: #667eea;
    font-size: 1rem;
}

.stocks-table .stock-name {
    color: #7f8c8d;
    font-size: 0.875rem;
}

.stocks-table .positive {
    color: #27ae60;
    font-weight: 600;
}

.stocks-table .negative {
    color: #e74c3c;
    font-weight: 600;
}

/* Markets responsive styles */
@media (max-width: 768px) {
    .markets-layout {
        flex-direction: column;
    }

    .markets-main-content {
        padding: 1rem;
        margin-left: 0;
    }

    .index-grid {
        flex-direction: column;
    }

    .market-grid {
        grid-template-columns: 1fr;
    }

    .markets-header h2 {
        font-size: 1.5rem;
    }

    .stocks-table-container {
        overflow-x: auto;
    }

    .stocks-table {
        min-width: 800px;
    }

    .stocks-table th,
    .stocks-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

.stock-row {
    transition: background-color 0.2s ease;
    cursor: pointer !important;
}

.stock-row:hover {
    background-color: #f8f9fa;
}

.market-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stock-symbol {
    color: #3498db;
    font-weight: 600;
    cursor: pointer !important;
}

.stock-row:hover .stock-symbol {
    text-decoration: underline;
}

.stock-row td {
    cursor: pointer !important;
}


.ticker-layout {
    display: flex;
    min-height: 100vh;
}

.ticker-main-content {
    flex: 1;
    padding: 0.75rem;
}

.ticker-header {
    background: transparent;
    padding: 8px 0;
    margin-bottom: 16px;
}

.ticker-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticker-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.ticker-symbol {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.ticker-price-section {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.ticker-current-price {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.ticker-price-change {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.ticker-price-change.positive {
    color: #27ae60;
    background: #e8f8f0;
}

.ticker-price-change.negative {
    color: #e74c3c;
    background: #fdecea;
}

.ticker-last-updated {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 6px;
}

/* Ticker Tabs Navigation */
.ticker-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 12px;
    margin-top: 8px;
}

.ticker-tab {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    position: relative;
}

.ticker-tab:hover {
    color: #374151;
    background: #f9fafb;
}

.ticker-tab.active {
    color: #1f2937;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

/* Second Level Tabs */
.second-level-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.second-level-tab {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.second-level-tab:hover {
    color: #374151;
    background: transparent;
}

.second-level-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

.second-level-tab-contents {
    position: relative;
}

.second-level-tab-content {
    display: none;
}

.second-level-tab-content.active {
    display: block;
}

.ticker-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.ticker-fundamentals-card {
    background: white;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.fundamentals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.fundamental-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #ecf0f1;
}

.fundamental-item:last-child {
    border-bottom: none;
}

.fundamental-label {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
}

.fundamental-value {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
}

.ticker-chart-card {
    background: white;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ticker-chart-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.chart-controls {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.chart-control-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.chart-control-btn:hover {
    background: #f8f9fa;
}

.chart-control-btn.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

#period-performance {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    vertical-align: middle;
}

#period-performance.positive {
    background: #27ae60;
    color: white;
}

#period-performance.negative {
    background: #e74c3c;
    color: white;
}

#priceChart {
    width: 100%;
    height: 400px;
}

.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-section {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.error-section h3 {
    color: #e74c3c;
    margin-bottom: 10px;
}

@media (max-width: 1024px) {
    .ticker-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ticker-layout {
        flex-direction: column;
    }

    .ticker-main-content {
        padding: 1rem;
        margin-left: 0;
    }

    .ticker-header {
        padding: 4px 0;
    }

    .ticker-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ticker-tab {
        padding: 10px 16px;
        font-size: 14px;
        white-space: nowrap;
    }
}
/* Company Info Card */
.company-info-card {
    background: transparent;
    padding: 4px 0;
    margin-bottom: 8px;
}

.company-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.company-info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.company-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.company-info-item.full-width {
    grid-column: 1 / -1;
}

.company-info-item .info-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.company-info-item .info-value {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 400;
    line-height: 1.4;
}

/* ===== TICKER NEWS PANELS ===== */

.ticker-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.ticker-news-panel {
    background: white;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ticker-news-panel h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.ticker-news-item {
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
}

.ticker-news-item:last-child {
    border-bottom: none;
}

.ticker-news-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.ticker-news-title:hover {
    color: #2563eb;
}

.ticker-news-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #7f8c8d;
}

.ticker-news-time {
    color: #95a5a6;
}

.ticker-news-source {
    color: #7f8c8d;
}

.ticker-news-list .loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #666;
}

.ticker-news-list .loading-indicator .loading-spinner {
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
}

.ticker-news-list .no-news-message,
.ticker-news-list .error-message {
    padding: 2rem;
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

.ticker-news-list .error-message {
    color: #e74c3c;
}

@media (max-width: 1024px) {
    .ticker-news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ticker-news-panel {
        max-height: 400px;
    }
}

/* ===== TICKER NEWS/ANALYSIS FULL PAGE PANEL ===== */

.ticker-news-full-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 16px;
    padding: 20px 24px;
}

.ticker-news-full-panel h2 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ecf0f1;
}

.ticker-news-full-panel .ticker-news-list {
    max-height: none;
}

.ticker-news-full-panel .ticker-news-item {
    padding: 14px 0;
    border-bottom: 1px solid #ecf0f1;
}

.ticker-news-full-panel .ticker-news-item:last-child {
    border-bottom: none;
}

.ticker-news-full-panel .ticker-news-title {
    font-size: 15px;
}

/* ===== WATCH LISTS PAGE ===== */

.add-watch-list-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-watch-list-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.watch-list-section {
    margin-bottom: 2rem;
}

.watch-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.watch-list-header .section-title {
    margin: 0;
}

.watch-list-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-edit {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: #ddd;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    background: #ddd;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.empty-watch-list {
    color: #888;
    font-style: italic;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

/* Watch List Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-large {
    max-width: 550px;
}

.modal-content.modal-small {
    max-width: 380px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    gap: 0.75rem;
}

.modal-footer-right {
    display: flex;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.ticker-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ticker-input-row input {
    flex: 1;
}

.btn-add-ticker {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.75rem 1rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.btn-add-ticker:hover {
    background: #218838;
}

/* Ticker Autocomplete Styles */
.ticker-autocomplete-wrapper {
    position: relative;
    flex: 1;
}

.ticker-autocomplete-wrapper input {
    width: 100%;
}

.ticker-autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.ticker-autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #f5f5f5;
}

.autocomplete-symbol {
    font-weight: 600;
    color: #333;
    min-width: 70px;
    margin-right: 1rem;
}

.autocomplete-name {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-empty {
    padding: 1rem;
    color: #888;
    text-align: center;
    font-style: italic;
}

.tickers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-tickers {
    color: #888;
    font-style: italic;
    margin: 0;
}

.flash-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: flashSlideIn 0.3s ease;
}

.flash-message.active {
    display: block;
}

.flash-message.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

@keyframes flashSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ticker-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.ticker-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ticker-remove:hover {
    color: white;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.text-muted {
    color: #888;
    font-size: 0.9rem;
}

.empty-section {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Watch Lists Page Responsive */
@media (max-width: 768px) {
    .watch-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .watch-list-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer-right {
        width: 100%;
        justify-content: flex-end;
    }
}
