/* ==========================================
   GLOBAL RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    min-height: 100vh;
    padding: 0;
    color: #fff;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   NAVBAR STYLES
   ========================================== */
.navbar {
    background: rgba(22, 33, 38, 0.95);
    border-bottom: 2px solid rgba(16, 185, 129, 0.3);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item {
    padding: 20px 25px;
    color: #999;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.nav-item.active {
    color: #10b981;
    border-bottom-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* ==========================================
   CONTENT WRAPPER
   ========================================== */
.content-wrapper {
    padding: 40px 20px;
    flex: 1 0 auto;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   HEADER STYLES
   ========================================== */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header p {
    color: #10b981;
    font-size: 1.1em;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */
.form-section {
    background: rgba(22, 33, 38, 0.95);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #fff;
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: #2c2c2c;
    border: 2px solid #4a4a4a;
    border-radius: 6px;
    font-size: 15px;
    color: #fff;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 15px 30px;
    background: transparent;
    border: 2px dashed #4a9eff;
    color: #4a9eff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(74, 158, 255, 0.1);
}

/* ==========================================
   SECTION TITLES & BADGES
   ========================================== */
.section-title {
    color: #10b981;
    font-size: 1.3em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.optional-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    margin-right: 8px;
}

.highlight {
    color: #10b981;
    font-weight: 600;
}

/* ==========================================
   LOADING STATES
   ========================================== */
.loading {
    text-align: center;
    padding: 40px;
    color: #10b981;
}

.loading-spinner {
    border: 4px solid rgba(16, 185, 129, 0.1);
    border-top: 4px solid #10b981;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   ERROR & SUCCESS MESSAGES
   ========================================== */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    color: #ef4444;
}

.error-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    color: #10b981;
}

/* ==========================================
   NOTIFICATION
   ========================================== */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 20px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    font-size: 16px;
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.notification-icon {
    font-size: 24px;
}

.notification-message {
    flex: 1;
}

/* ==========================================
   FOOTER STYLES
   ========================================== */
.footer {
    background: linear-gradient(180deg, rgba(15, 20, 25, 0) 0%, rgba(15, 20, 25, 0.98) 100%);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    padding: 35px 20px 20px;
    margin-top: auto;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #10b981 50%, transparent 100%);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    font-size: 1.8em;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.footer-tagline {
    color: #888;
    font-size: 0.9em;
    font-style: italic;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s;
    padding: 12px 24px;
    border-radius: 50px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.social-link:hover {
    color: #fff;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.social-link svg {
    transition: transform 0.3s;
}

.social-link:hover svg {
    transform: rotate(360deg) scale(1.1);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: #999;
    text-decoration: none;
    font-size: 0.95em;
    transition: all 0.3s;
    position: relative;
    padding: 5px 0;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.3s;
}

.footer-link:hover::after {
    width: 100%;
}

.separator {
    color: #444;
    font-size: 0.8em;
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-copyright {
    color: #888;
    font-size: 0.85em;
    margin-bottom: 0;
}

.footer-disclaimer {
    color: #666;
    font-size: 0.75em;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.5;
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #10b981;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content link (for screen readers) */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: #10b981;
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* Screen reader only text */
.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;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-item,
    .footer-link,
    .social-link {
        border: 2px solid currentColor;
    }
    
    .btn-primary,
    .cta-button {
        border: 3px solid #000;
    }
}

/* External link indicator - disabled by default */
/* Uncomment to enable external link indicators */
/*
a[target="_blank"]:not(.social-link):not(.nav-item)::after {
    content: " ↗";
    font-size: 0.8em;
    vertical-align: super;
    margin-left: 2px;
    opacity: 0.7;
}
*/

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ==========================================
   NO JAVASCRIPT WARNING
   ========================================== */
.no-js-warning {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 18px 20px;
    text-align: center;
    z-index: 99999;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    border-bottom: 3px solid #b91c1c;
}

.no-js-warning strong {
    display: block;
    font-size: 18px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    .nav-item {
        padding: 15px 20px;
        font-size: 0.85em;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .content-wrapper {
        padding: 30px 15px;
    }

    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1em;
    }

    .form-section {
        padding: 20px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 16px;
        font-size: 16px;
    }

    .footer-content {
        gap: 25px;
    }

    .footer-brand {
        margin-bottom: 10px;
    }

    .footer-logo {
        font-size: 1.6em;
    }

    .social-link {
        padding: 10px 20px;
        font-size: 0.9em;
        min-height: 44px;
        min-width: 44px;
    }

    .footer-links {
        gap: 15px;
    }

    .footer-link {
        font-size: 0.85em;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .notification {
        padding: 15px 25px;
        font-size: 14px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6em;
    }

    .form-section {
        padding: 15px;
    }

    .navbar-container {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        flex-shrink: 0;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .navbar,
    .footer,
    .notification {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}