/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-bg: #0a0e27;
    --secondary-bg: #141b3d;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-gold: #f59e0b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Space Grotesk', monospace;
}

body {
    font-family: var(--font-primary);
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

/* ===================================
   VIDEO BACKGROUND
   =================================== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#youtube-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 56.25vw;
    /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh;
    /* 16:9 aspect ratio */
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(10, 14, 39, 0.85) 0%,
            rgba(20, 27, 61, 0.75) 50%,
            rgba(10, 14, 39, 0.85) 100%);
    backdrop-filter: blur(2px);
}

/* ===================================
   BACK BUTTON
   =================================== */
.back-button {
    position: fixed;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(20, 27, 61, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    color: var(--text-primary);
    transform: translateX(-4px);
}

.back-button svg {
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-2px);
}

/* ===================================
   MAIN CONTAINER
   =================================== */
.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.form-wrapper {
    width: 100%;
    max-width: 600px;
    background: rgba(20, 27, 61, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: var(--spacing-xl);
    backdrop-filter: blur(10px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(139, 92, 246, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

/* ===================================
   HEADER
   =================================== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon {
    width: 100%;
    height: 100%;
    color: var(--accent-purple);
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}

.title {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.title-main {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-sub {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 300;
    color: var(--text-secondary);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* ===================================
   FORM STYLES
   =================================== */
.report-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.label-icon {
    color: var(--accent-purple);
}

.input-wrapper,
.select-wrapper {
    position: relative;
}

.form-input,
.form-select {
    width: 100%;
    padding: var(--spacing-md);
    background: rgba(10, 14, 39, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent-purple);
    background: rgba(10, 14, 39, 0.7);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-input:hover,
.form-select:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

/* Custom Select Styling */
.form-select {
    appearance: none;
    cursor: pointer;
    padding-right: 3rem;
}

.select-arrow {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-purple);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.select-wrapper:hover .select-arrow {
    transform: translateY(-50%) translateY(-2px);
}

/* Date Input Styling */
.form-input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.form-input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* ===================================
   SUBMIT BUTTON
   =================================== */
.submit-button {
    position: relative;
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(139, 92, 246, 0.4),
        0 0 20px rgba(139, 92, 246, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-button.loading .button-icon {
    animation: spin 1s linear infinite;
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.submit-button:hover .button-icon {
    transform: scale(1.1);
}

/* ===================================
   STATUS MESSAGE
   =================================== */
.status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: var(--spacing-lg);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.status-message:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}

.status-loading {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-blue);
}

.status-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.status-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===================================
   INFO BOX
   =================================== */
.info-box {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    margin-top: var(--spacing-lg);
}

.info-icon {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.info-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .main-container {
        padding: var(--spacing-md);
    }

    .form-wrapper {
        padding: var(--spacing-lg);
    }

    .back-button {
        top: var(--spacing-md);
        left: var(--spacing-md);
        padding: var(--spacing-sm);
    }

    .back-button span {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: var(--spacing-sm);
    }

    .form-wrapper {
        padding: var(--spacing-md);
        border-radius: 16px;
    }

    .icon-container {
        width: 60px;
        height: 60px;
    }

    .form-input,
    .form-select {
        padding: var(--spacing-sm);
        font-size: 0.95rem;
    }

    .submit-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 1rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.form-input:focus-visible,
.form-select:focus-visible,
.submit-button:focus-visible,
.back-button:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}