/* ===================================
   GridSide - Carbon & Crimson Theme
   Landing Page & Password Reset Styles
   =================================== */

:root {
    --f1-red: #E10600;
    --matte-black: #0F0F0F;
    --dark-gray: #1A1A1A;
    --medium-gray: #2A2A2A;
    --light-gray: #8A8A8A;
    --white: #FFFFFF;
    --error-red: #FF4444;
    --success-green: #00C853;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--matte-black) 0%, var(--dark-gray) 100%);
    color: var(--white);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

body:not(.landing-page) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 480px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

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

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: inline-block;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.app-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--white) 0%, var(--f1-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--light-gray);
    font-size: 14px;
    font-style: italic;
}

/* Form Container */
.form-container,
.success-container,
.error-container {
    background: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.form-container:hover {
    transform: translateY(-2px);
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white);
}

.subtitle {
    color: var(--light-gray);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--white);
}

input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--matte-black);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    color: var(--white);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

input[type="password"]:focus {
    border-color: var(--f1-red);
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.1);
}

input[type="password"]::placeholder {
    color: var(--light-gray);
}

/* Password Requirements */
.password-requirements {
    margin-top: 12px;
    padding: 12px;
    background: rgba(225, 6, 0, 0.05);
    border: 1px solid rgba(225, 6, 0, 0.2);
    border-radius: 6px;
    font-size: 13px;
}

.requirements-title {
    margin: 0 0 8px 0;
    color: var(--white);
    font-weight: 500;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--light-gray);
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-weight: bold;
    color: var(--light-gray);
    font-size: 12px;
}

.requirement-check.met {
    color: var(--success-green);
}

.requirement-check.unmet {
    color: var(--light-gray);
}

/* Match Indicator */
.match-indicator {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.match-indicator.match {
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid var(--success-green);
    color: var(--success-green);
}

.match-indicator.no-match {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

/* Success Modal Styles */
.success-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.success-modal {
    position: relative;
    z-index: 2001;
    background: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: scaleIn 0.4s ease;
}

.success-modal h2 {
    color: var(--success-green);
    margin-bottom: 12px;
}

.success-info {
    color: var(--light-gray);
    font-size: 14px;
    margin: 16px 0 24px 0;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.success-actions .btn-primary {
    margin-top: 0;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    /* default to auto width for anchor-buttons and centerable CTAs */
    width: auto;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    text-decoration: none; /* remove underline for links styled as buttons */
}

/* keep form and success action buttons full width */
form .btn-primary,
.form-container .btn-primary,
.success-actions .btn-primary {
    width: 100%;
    display: flex;
}

.btn-primary {
    background: var(--f1-red);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: #C10500;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 6, 0, 0.4);
    text-decoration: none; /* ensure hover doesn't show underline */
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--medium-gray);
}

.btn-secondary:hover {
    background: var(--medium-gray);
    border-color: var(--f1-red);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Message */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

.message.success {
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid var(--success-green);
    color: var(--success-green);
}

/* Success/Error Icons */
.success-container,
.error-container {
    text-align: center;
}

.success-icon,
.error-icon {
    margin-bottom: 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

footer p {
    color: var(--light-gray);
    font-size: 12px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* CTA section center alignment */
.cta-section {
    text-align: center;
}

.cta-section .btn-primary {
    display: inline-block;
    width: auto;
    margin: 18px auto 0;
    padding: 14px 36px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .form-container,
    .success-container,
    .error-container {
        padding: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .app-name {
        font-size: 28px;
    }
}

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

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--f1-red);
    outline-offset: 2px;
}

/* ===================================
   LANDING PAGE STYLES
   =================================== */

.landing-page {
    background: linear-gradient(135deg, var(--matte-black) 0%, var(--dark-gray) 100%);
    display: block !important;
    padding: 0 !important;
}

.landing-container {
    width: 100%;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(42, 42, 42, 0.3);
    transition: all 0.3s ease;
    padding: 16px 0;
}

.navbar.scrolled {
    background: rgba(15, 15, 15, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--f1-red);
}

.nav-logo img {
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--f1-red);
}

.nav-cta {
    color: var(--f1-red) !important;
    border: 1px solid var(--f1-red);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--f1-red);
    color: var(--white) !important;
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    animation: fadeIn 0.6s ease-in;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--f1-red);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--light-gray);
    line-height: 1.6;
}

.btn-large {
    padding: 16px 32px !important;
    font-size: 16px !important;
    width: fit-content;
}

.hero-image {
    position: relative;
    height: 400px;
    padding: 0;
    margin: 0;
}

/* Hero slideshow styles - images fully cover the container (no padding) */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    padding: 0;
    margin: 0;
}

.slide {
    position: absolute;
    inset: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    transform: none;
    transition: opacity 500ms ease, transform 600ms ease;
    display: block;
}

.slide.active {
    opacity: 1;
    transform: none;
    z-index: 2;
}

.slide-media {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

.slide-media svg { width: 100%; height: 100%; display: block; }

/* Image slides: ensure full-bleed cover */
.slide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
}

/* hide arrow buttons if present (we use autoplay + indicators) */
.slide-btn { display: none !important; }

.slide-indicators { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 4; }
.indicator { width: 10px; height: 10px; background: rgba(255,255,255,0.25); border: none; border-radius: 50%; cursor: pointer; }
.indicator.active { background: var(--f1-red); }

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 24px; }
    .hero-image { width: 100%; height: 260px; }
    .hero-slideshow { height: 260px; }
}

/* Features Section */
.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.features h2 {
    font-size: 42px;
    margin-bottom: 60px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--dark-gray);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--f1-red);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(225, 6, 0, 0.15);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--white);
}

.feature-card p {
    color: var(--light-gray);
    font-size: 14px;
    line-height: 1.6;
}

/* About Section */
.about {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}

.about h2 {
    font-size: 42px;
    margin-bottom: 24px;
}

.about-content p {
    font-size: 16px;
    color: var(--light-gray);
    margin-bottom: 32px;
    line-height: 1.8;
}

.about-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.about-list li {
    font-size: 14px;
    color: var(--light-gray);
}

.about-list li::before {
    content: '';
    display: inline-block;
    margin-right: 8px;
}

/* CTA Section */
.cta-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--medium-gray) 100%);
    border-radius: 16px;
    margin-bottom: 80px;
}

.cta-section h2 {
    font-size: 38px;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 16px;
    color: var(--light-gray);
    margin-bottom: 32px;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    border-top: 1px solid var(--medium-gray);
    padding: 60px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-section p {
    color: var(--light-gray);
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--f1-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
    color: var(--light-gray);
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 60px 20px;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-image {
        height: 300px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .features h2,
    .about h2,
    .cta-section h2 {
        font-size: 28px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-subtitle,
    .cta-section p {
        font-size: 16px;
    }
}
