/* ===== 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;
}

/* Mobile menu button removed - profile button now shows directly */

/* ===== USER INFO & AUTH ===== */
.profile-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-btn {
    background: transparent;
    border: 2px solid #667eea;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-height: 44px;
}

.profile-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.profile-name {
    font-weight: 600;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

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

.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 {
    height: 1px;
    background: rgba(102, 126, 234, 0.2);
    margin: 0.5rem 0.75rem;
}

.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: 4rem 0;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-tagline {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.85;
    font-weight: 500;
    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(0, 0, 0, 0.2);
}

.hero-btn-primary {
    background: #fff;
    color: #667eea;
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.hero-btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.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: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.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 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.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 .interest-tag {
    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;
}

.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: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    gap: 1rem;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.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;
    justify-content: space-between;
}

.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;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.news-description::after {
    content: "...";
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, #f8f9fa 20%);
    color: #667eea;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    padding-left: 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-description::after:hover {
    color: #5a6fd8;
}

.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;
}

.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 {
    background: white;
    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: 200px;
    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;
}

.suggestion-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}


.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;
    }
    
    /* Profile dropdown mobile styles */
    .profile-container {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        z-index: 1001;
        margin-right: 0;
        max-width: calc(100% - 40px);
    }
    
    .profile-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        border-radius: 25px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.3s ease;
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
        touch-action: manipulation;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
        margin: 0;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .profile-btn:active {
        transform: translateY(1px);
        box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
    }
    
    .profile-btn i {
        color: white;
    }
    
    .profile-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
    }
    
    .profile-btn:active::after {
        width: 100px;
        height: 100px;
    }
    
    .profile-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        min-width: 200px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1000;
        margin-top: 0.5rem;
        border: 1px solid rgba(102, 126, 234, 0.1);
        display: none;
        max-height: 0;
        overflow: hidden;
    }
    
    .profile-dropdown.show {
        display: block;
        opacity: 1;
        visibility: visible;
        max-height: 300px;
        transform: translateY(0);
    }
    
    .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: 1.5rem;
        margin: 1rem 0;
    }
    
    .feeds .preferences-list {
        justify-content: center;
        gap: 0.4rem;
    }
    
    .feeds .interest-tag {
        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;
    }
    
    .news-image {
        width: 100%;
        height: 56.25vw;
        max-height: 300px;
        min-height: 200px;
    }
    
    .news-description {
        -webkit-line-clamp: 3;
        font-size: 0.9rem;
    }
    
    .news-description::after {
        content: "...";
        background: linear-gradient(90deg, transparent, #f8f9fa 30%);
        font-size: 0.75rem;
        padding-left: 15px;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
        font-size: 0.8rem;
    }
    
    .refresh-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 1rem;
        margin: 1rem auto;
        display: block;
    }
    
    /* Interests 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 interests 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 interests */
    .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: 1rem;
    }
    
    .news-item {
        padding: 0.8rem;
    }
    
    .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;
}

/* Article Popup Styles */
.feeds .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);
}

.feeds .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);
    }
}

.feeds .article-popup-header {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    background: #f8f9fa;
}

.feeds .article-popup-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    padding-right: 2rem;
}

.feeds .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;
}

.feeds .popup-close-btn:hover {
    background-color: #f8f9fa;
    color: #333;
}

.feeds .article-popup-body {
    padding: 2rem;
}

.feeds .popup-image {
    margin-bottom: 1.5rem;
    text-align: center;
}

.feeds .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;
}

.feeds .popup-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.feeds .popup-meta span {
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.feeds .popup-meta span:empty {
    display: none;
}

.feeds .popup-content-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.feeds .popup-content-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.feeds .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;
}

.feeds .article-popup-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.feeds .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);
}

.feeds .popup-original-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.feeds .popup-original-btn i {
    font-size: 0.9rem;
}

/* Make news items clickable */
.feeds .news-item {
    cursor: pointer;
    user-select: none;
    position: relative;
    max-width: 100%;
}

.feeds .news-image {
    flex-shrink: 0;
    width: 280px;
    height: 158px;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
}

.feeds .news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}



/* Responsive adjustments for feeds */
@media (max-width: 1200px) {
    .feeds .article-popup-content {
        max-width: 95%;
        width: 95%;
    }
}

@media (max-width: 768px) {
    .feeds .article-popup-content {
        width: 98%;
        max-width: 98%;
        max-height: 95vh;
        height: 95vh;
    }
    
    .feeds .article-popup-header h2 {
        font-size: 1.2rem;
    }
    
    .feeds .popup-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .feeds .news-image {
        width: 240px;
        height: 135px;
    }
}

/* ===== WAITLIST STYLES ===== */
.waitlist-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.waitlist-section h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.waitlist-section p {
    color: rgba(255, 255, 255, 0.9);
    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: none;
    border-radius: 50px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.waitlist-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 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: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.beta-notice h3 {
    color: #ffc107;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.beta-notice p {
    color: rgba(255, 255, 255, 0.9);
    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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 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: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.home .flash-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.home .flash-error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

@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;
    }
} 