/* ========================================
   CYBER-TECH DESIGN SYSTEM
   Electric Colors & Dynamic Animations
   ======================================== */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: #0A1628;
    color: #E5E7EB;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   ANIMATED BACKGROUNDS - CYBER THEME
   ======================================== */

.grid-background {
    background-image:
        linear-gradient(to right, rgba(0, 255, 159, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 255, 159, 0.12) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: grid-flow 20s linear infinite;
}

@keyframes grid-flow {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

.gradient-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orbs::before,
.gradient-orbs::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.2;
    animation: float-orb 20s ease-in-out infinite;
}

.gradient-orbs::before {
    background: radial-gradient(circle, #00FF9F 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.gradient-orbs::after {
    background: radial-gradient(circle, #FF6B00 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: 10s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, -100px) scale(1.1); }
    66% { transform: translate(-100px, 100px) scale(0.9); }
}

/* ========================================
   GRADIENT ANIMATIONS
   ======================================== */

@keyframes gradient-x {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ========================================
   LOGO GLOW EFFECT - CYBER THEME
   ======================================== */

.logo-glow h1 {
    text-shadow:
        0 0 20px rgba(0, 255, 159, 0.6),
        0 0 40px rgba(0, 240, 255, 0.4),
        0 0 60px rgba(255, 107, 0, 0.3);
    transition: text-shadow 0.3s ease;
}

.logo-glow:hover h1 {
    text-shadow:
        0 0 30px rgba(0, 255, 159, 0.8),
        0 0 60px rgba(0, 240, 255, 0.6),
        0 0 90px rgba(255, 107, 0, 0.5);
}

/* ========================================
   STAT CARDS - CYBER THEME
   ======================================== */

.stat-card {
    position: relative;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    background: rgba(19, 32, 64, 0.6);
    border: 2px solid rgba(0, 255, 159, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 159, 0.1);
}

.stat-card:hover {
    border-color: rgba(0, 255, 159, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 255, 159, 0.3), 0 0 60px rgba(0, 240, 255, 0.2);
}

/* ========================================
   SCROLL REVEAL ANIMATION
   ======================================== */

.reveal-element {
    opacity: 0;
    transform: translateY(50px);
    animation: reveal 0.8s ease-out forwards;
}

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

/* ========================================
   FEATURE CARDS HOVER EFFECTS
   ======================================== */

.feature-card-neo {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card-neo:hover {
    transform: translateY(-12px) scale(1.02);
}

/* ========================================
   BUTTON ANIMATIONS - CYBER THEME
   ======================================== */

.login-btn-neo,
.submit-btn-neo {
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(0, 255, 159, 0.4),
        0 0 30px rgba(0, 240, 255, 0.3);
    transition: all 0.3s ease;
}

.login-btn-neo:hover,
.submit-btn-neo:hover {
    box-shadow:
        0 8px 40px rgba(0, 255, 159, 0.6),
        0 0 60px rgba(0, 240, 255, 0.5),
        0 0 80px rgba(255, 214, 0, 0.3);
}

.submit-btn-neo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn-neo:active::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   CUSTOM SCROLLBAR - CYBER THEME
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0A1628;
    border-left: 1px solid rgba(0, 255, 159, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00FF9F, #00D9D9);
    border-radius: 10px;
    border: 2px solid #0A1628;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #39FF14, #FFD600);
}

/* ========================================
   TEXTAREA ENHANCEMENTS - CYBER THEME
   ======================================== */

textarea#manuscript {
    scrollbar-width: thin;
    scrollbar-color: #00FF9F #132040;
}

textarea#manuscript::-webkit-scrollbar {
    width: 8px;
}

textarea#manuscript::-webkit-scrollbar-track {
    background: #132040;
    border-radius: 10px;
}

textarea#manuscript::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00FF9F, #00D9D9);
    border-radius: 10px;
}

/* ========================================
   SELECT DROPDOWN CUSTOM STYLES
   ======================================== */

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300FF9F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

select option {
    background: #132040;
    color: #E5E7EB;
    padding: 0.5rem;
}

/* ========================================
   CHECKBOX CUSTOM STYLES - CYBER THEME
   ======================================== */

input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 255, 159, 0.5);
    border-radius: 4px;
    background: #132040;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #00FF9F, #00D9D9);
    border-color: #00FF9F;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.5);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0A1628;
    font-size: 14px;
    font-weight: bold;
}

input[type="checkbox"]:hover {
    border-color: #00FF9F;
    box-shadow: 0 0 15px rgba(0, 255, 159, 0.4);
}

/* ========================================
   HEADER STYLES - CYBER THEME
   ======================================== */

.header-neo {
    background: rgba(10, 22, 40, 0.85);
    border-bottom: 2px solid rgba(0, 255, 159, 0.3);
    box-shadow: 0 4px 30px rgba(0, 255, 159, 0.15);
}

/* ========================================
   LOADING STATES
   ======================================== */

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

.loading-shimmer {
    background: linear-gradient(
        90deg,
        rgba(0, 255, 159, 0.1) 0%,
        rgba(0, 240, 255, 0.3) 50%,
        rgba(0, 255, 159, 0.1) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ========================================
   BORDER ANIMATION
   ======================================== */

@keyframes border-flow {
    0%, 100% {
        border-color: rgba(0, 255, 159, 0.5);
    }
    33% {
        border-color: rgba(0, 240, 255, 0.5);
    }
    66% {
        border-color: rgba(255, 214, 0, 0.5);
    }
}

.border-animated {
    animation: border-flow 3s ease-in-out infinite;
}

/* ========================================
   GLASS MORPHISM EFFECTS - CYBER THEME
   ======================================== */

.glass {
    background: rgba(19, 32, 64, 0.5);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(0, 255, 159, 0.2);
}

.glass-strong {
    background: rgba(19, 32, 64, 0.7);
    backdrop-filter: saturate(200%) blur(30px);
    -webkit-backdrop-filter: saturate(200%) blur(30px);
    border: 1px solid rgba(0, 255, 159, 0.3);
}

/* ========================================
   RESPONSIVE DESIGN ENHANCEMENTS
   ======================================== */

@media (max-width: 1024px) {
    .gradient-orbs::before,
    .gradient-orbs::after {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .gradient-orbs::before,
    .gradient-orbs::after {
        width: 300px;
        height: 300px;
        filter: blur(80px);
    }

    .grid-background {
        background-size: 40px 40px;
    }

    @keyframes grid-flow {
        0% { background-position: 0 0; }
        100% { background-position: 40px 40px; }
    }
}

@media (max-width: 640px) {
    .reveal-element {
        transform: translateY(30px);
    }

    .stat-card {
        padding: 0.75rem 1rem;
    }
}

/* ========================================
   ACCESSIBILITY & MOTION PREFERENCES
   ======================================== */

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

    .gradient-orbs::before,
    .gradient-orbs::after {
        animation: none;
    }

    .grid-background {
        animation: none;
    }
}

/* ========================================
   FOCUS STATES FOR ACCESSIBILITY
   ======================================== */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #00FF9F;
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.5);
}

/* ========================================
   SHAKE ANIMATION
   ======================================== */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

.gpu-accelerate {
    transform: translateZ(0);
    will-change: transform;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .gradient-orbs,
    .grid-background,
    header,
    footer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
