/* Base Styles - Space Theme */
:root {
    --space-dark: #0a0e27;
    --space-blue: #1a2847;
    --space-purple: #6366f1;
    --space-cyan: #06b6d4;
    --space-pink: #ec4899;
    --nebula-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --cosmic-glow: rgba(99, 102, 241, 0.3);
    --focus-color: #06b6d4;
    --focus-outline: 2px solid var(--focus-color);
    --focus-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--space-dark);
    color: #e2e8f0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Improve touch scrolling on mobile */
    -webkit-overflow-scrolling: touch;
}

/* Skip Link for Keyboard Navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--space-purple);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: var(--focus-outline);
    box-shadow: var(--focus-shadow);
}

/* Screen Reader Only Class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Fieldset and Legend Styling for Accessibility */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    font-weight: 600;
    margin-bottom: 1rem;
    color: inherit;
}

legend.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Navbar Override */
.navbar {
    background: rgba(10, 14, 39, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-toggler {
    border-color: rgba(99, 102, 241, 0.5);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
    box-shadow: var(--focus-shadow);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(99, 102, 241, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.navbar-brand-white {
    color: #E8F9FF;
    text-shadow: 0 0 15px rgba(232, 249, 255, 0.3);
}

.navbar-brand-gradient {
    background: linear-gradient(135deg, #00E5FF, #005BFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand:hover .navbar-logo {
    filter: brightness(1.3);
}

/* Language Toggle */
.language-toggle {
    margin-left: 1rem;
}

.btn-language-toggle {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-language-toggle:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

.nav-link {
    color: #cbd5e1 !important;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-link i {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--space-cyan) !important;
    transform: translateY(-2px);
}

.nav-link:hover i {
    color: var(--space-cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--space-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

/* Focus indicators for navigation links */
.nav-link:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
    box-shadow: var(--focus-shadow);
    border-radius: 4px;
}

/* Hide text labels on desktop, show only icons */
@media (min-width: 769px) {
    .nav-link span {
        display: none;
    }
}

/* Logout Button */
.btn-logout {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.8));
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

.btn-logout:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1), rgba(220, 38, 38, 1));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    color: white;
}

.btn-logout:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
    box-shadow: var(--focus-shadow);
}

.btn-login {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-login:hover {
    background: linear-gradient(135deg, #7c3aed, #6d5dfc);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
    color: white;
}

/* Main Container */
main.container {
    max-width: 1400px;
}

/* Cosmic Background Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--space-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--space-purple), var(--space-cyan));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--space-cyan), var(--space-pink));
}

/* Mobile Responsive - Base */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-logo {
        height: 25px;
    }
    
    .navbar-collapse {
        margin-top: 1.25rem;
        padding: 1rem 0;
        background: rgba(15, 23, 42, 0.95);
        border-radius: 12px;
        border: 1px solid rgba(99, 102, 241, 0.2);
    }
    
    .navbar-nav {
        gap: 0.5rem;
        width: 100%;
        padding: 0 0.75rem;
        flex-direction: column !important;
    }
    
    .nav-link {
        padding: 1rem 1.25rem !important;
        border-radius: 10px;
        background: rgba(99, 102, 241, 0.08);
        transition: all 0.3s ease;
        display: flex !important;
        align-items: center;
        font-size: 1rem;
        font-weight: 600;
        border: 1px solid rgba(99, 102, 241, 0.15);
        width: 100%;
        text-align: left;
    }
    
    .nav-link i {
        font-size: 1.25rem !important;
        margin-right: 0.75rem;
        width: 24px;
        display: inline-flex;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .nav-link span {
        flex: 1;
        text-align: left;
    }
    
    .nav-link:hover,
    .nav-link:active {
        background: rgba(99, 102, 241, 0.2);
        transform: translateY(0);
        border-color: rgba(99, 102, 241, 0.4);
    }
    
    .nav-link::after {
        display: none; /* Remove underline effect on mobile */
    }
    
    .btn-logout,
    .btn-login {
        padding: 1rem 1.25rem !important;
        font-size: 1rem;
        margin-top: 0.5rem;
        text-align: left;
        width: 100%;
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        border-radius: 10px;
    }
    
    .btn-logout i,
    .btn-login i {
        font-size: 1.25rem;
        margin-right: 0.75rem;
        width: 24px;
        display: inline-flex;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .btn-logout .logout-text,
    .btn-login span {
        display: inline;
        font-weight: 600;
        flex: 1;
        text-align: left;
    }
    
    main.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .brand-plan-badge {
        margin-top: 0.25rem;
        font-size: 0.7rem;
        padding: 0.1rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand,
    .navbar-brand-white,
    .navbar-brand-gradient {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        height: 22px;
    }
    
    .btn-logout,
    .btn-login {
        padding: 0.7rem 0.875rem;
        font-size: 0.9rem;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for buttons on touch devices */
    .btn,
    button,
    a.btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Disable hover effects on touch devices */
    .btn:hover,
    .nav-link:hover,
    .card:hover {
        transform: none;
    }
    
    /* Better tap highlight */
    * {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.3);
    }
}

.brand-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(6, 182, 212, 0.35);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a5f3fc;
}

/* Footer Styles */
.site-footer {
    background: rgba(10, 14, 39, 0.95);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    flex: 1;
    min-width: 250px;
}

.footer-brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.footer-copyright {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-links-column {
    min-width: 150px;
}

.footer-links-column h4 {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links-column a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links-column a:hover {
    color: var(--space-cyan);
}

.footer-links-column a:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
    box-shadow: var(--focus-shadow);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        width: 100%;
        gap: 2rem;
    }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 40, 71, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    display: none;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text p {
    color: #e2e8f0;
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.cookie-consent-text a {
    color: var(--space-cyan);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-consent-text a:hover {
    color: #00E5FF;
}

.cookie-consent-text a:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
    box-shadow: var(--focus-shadow);
    border-radius: 4px;
}

.cookie-consent-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #00E5FF, #005BFF);
    color: white;
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.cookie-btn-accept:focus,
.cookie-btn-reject:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
    box-shadow: var(--focus-shadow);
}

.cookie-btn-reject {
    background: rgba(99, 102, 241, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.cookie-btn-reject:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-consent-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

