/* ============================================
   iShout Landing Page
   Brutalist Card + Particles + Parallax
   ============================================ */

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

html, body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #080808;
    color: #e0e0e0;
    height: 100%;
    overflow: hidden;
}

::selection { background: #EF4444; color: #fff; }

/* ---- Parallax Background Orbs ---- */
.parallax-bg {
    position: fixed;
    inset: -100px;
    z-index: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #EF4444 0%, transparent 70%);
    top: -15%;
    left: -10%;
    animation: orbDrift1 22s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #991B1B 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation: orbDrift2 28s ease-in-out infinite;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #DC2626 0%, transparent 70%);
    top: 40%;
    left: 55%;
    animation: orbDrift3 18s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(60px, 40px) scale(1.05); }
    50%      { transform: translate(-30px, 80px) scale(0.95); }
    75%      { transform: translate(40px, -30px) scale(1.02); }
}

@keyframes orbDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(-50px, -40px) scale(1.03); }
    50%      { transform: translate(40px, -60px) scale(0.97); }
    75%      { transform: translate(-30px, 50px) scale(1.05); }
}

@keyframes orbDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -50px) scale(1.08); }
    66%      { transform: translate(-50px, 30px) scale(0.92); }
}

/* ---- Particles container (tsParticles) ---- */
#particles {
    position: fixed;
    inset: 0;
    z-index: 1;
}

#particles canvas {
    pointer-events: none;
}

/* ---- Vignette ---- */
.vignette {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(8, 8, 8, 0.8) 100%);
    pointer-events: none;
}

/* ---- Login Wrapper ---- */
.login-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    padding: 20px;
    animation: fadeInUp 0.8s ease-out;
}

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

/* ---- Ambient glow behind card ---- */
.card-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(239, 68, 68, 0.08) 0%,
        rgba(239, 68, 68, 0.04) 40%,
        transparent 70%
    );
    filter: blur(40px);
    animation: glowPulse 5s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes glowPulse {
    from { opacity: 0.5; transform: scale(1); }
    to   { opacity: 1; transform: scale(1.1); }
}

/* ============================================
   THE CARD — Brutalist
   ============================================ */
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
}

/* Holographic border & light sweep — hidden in brutalist mode */
.holo-border,
.light-sweep {
    display: none;
}

/* ---- Card Inner ---- */
.card-inner {
    position: relative;
    z-index: 1;
    background: #080808;
    border: 1px solid #333;
    padding: 48px 40px 40px;
}

.card-inner::before {
    display: none;
}

/* ---- Logo ---- */
.logo-area {
    text-align: center;
    margin-bottom: 32px;
}

.logo-img {
    max-width: 260px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(239, 68, 68, 0.15));
    transition: filter 0.3s ease;
}

.logo-img:hover {
    filter: drop-shadow(0 0 40px rgba(239, 68, 68, 0.3));
}

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

.input-group label {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    background: #080808;
    border: 1px solid #333;
    color: #e0e0e0;
    font-size: 14px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    transition: border-color 0.2s ease;
    outline: none;
}

.input-group input::placeholder {
    color: #333;
}

.input-group input:focus {
    border-color: #EF4444;
}

/* ---- Sign In Button ---- */
.login-btn {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid #EF4444;
    color: #EF4444;
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Kill the shimmer sweep */
.login-btn::after {
    display: none;
}

.login-btn:hover {
    background: #EF4444;
    color: #080808;
    transform: none;
    box-shadow: none;
}

.login-btn:active {
    transform: none;
    box-shadow: none;
}

/* Loading state */
.login-btn.loading .btn-text { opacity: 0; }
.login-btn.loading .btn-loader { opacity: 1; }
.btn-text { transition: opacity 0.2s; }

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-top-color: #EF4444;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---- Error Message ---- */
.error-message {
    color: #EF4444;
    font-size: 12px;
    text-align: center;
    margin-bottom: 16px;
    padding: 8px 12px;
    line-height: 1.4;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.error-message.visible {
    min-height: 20px;
    max-height: 80px;
    margin-bottom: 16px;
    border: 1px solid #4a2a2a;
}

/* ---- Card Footer ---- */
.card-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #222;
}

.card-footer p {
    color: #444;
    font-size: 11px;
    letter-spacing: 1px;
}

/* ---- Footer ---- */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 16px;
    z-index: 10;
}

footer p {
    color: #333;
    font-size: 11px;
    letter-spacing: 1px;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .gradient-orb { animation: none !important; }
    .login-wrapper { animation: none !important; }
    .card-glow { animation: none !important; }
    .login-btn::after { transition: none; }
    .parallax-bg { transition: none; transform: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 520px) {
    .login-card {
        max-width: 100%;
    }

    .card-inner {
        padding: 32px 20px 28px;
    }

    .logo-img {
        max-width: 200px;
    }

    .input-group input {
        padding: 11px 12px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .login-btn {
        padding: 12px;
    }
}

@media (max-height: 640px) {
    .logo-area {
        margin-bottom: 20px;
    }

    .logo-img {
        max-width: 180px;
    }

    .card-inner {
        padding: 24px 24px 20px;
    }

    .input-group {
        margin-bottom: 14px;
    }

    .card-footer {
        display: none;
    }
}
