/* ═══════════════════════════════════════════════════════════════
   AASRAA Modern Dark Theme — style.css
   Theme: Midnight — Slate #030712, Indigo #6366f1, Cyan #0ea5e9
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg-page: #f9fafb;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: #ffffff;
    --border-card: rgba(0, 0, 0, 0.08);
    --text-900: #111827;
    --text-600: #4b5563;
    --text-400: #9ca3af;
    --accent: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.12);
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    background: var(--bg-page);
    color: var(--text-900);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Glow Background ────────────────────────────────────────── */
.glow-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 10%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(14, 165, 233, 0.05) 0%, transparent 40%);
}

.container {
    position: relative;
    z-index: 10;
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: clamp(3rem, 10vh, 6rem) 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
    text-align: center;
    animation: fadeInDown 0.8s var(--transition) both;
}

.logo-area {
    margin-bottom: 2.5rem;
}

.logo {
    width: 500px;
    height: auto;
    object-fit: contain;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.accent-text {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-600);
    max-width: 480px;
    margin: 0 auto;
}

/* ── Auth Card ──────────────────────────────────────────────── */
.auth-section {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.8s 0.2s var(--transition) both;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

.shield-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.auth-card p {
    color: var(--text-600);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Captcha UI */
.captcha-display {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.captcha-img {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    max-width: 100%;
    height: auto;
}

.refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-400);
    transition: transform 0.3s;
}

.refresh-btn:hover {
    transform: rotate(180deg);
    color: var(--accent);
}

.input-field {
    margin-bottom: 1.5rem;
}

#captcha-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-lg);
    color: var(--text-900);
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 0.1em;
    outline: none;
    transition: all 0.3s;
}

#captcha-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.primary-btn:active {
    transform: translateY(0);
}

.error-msg {
    margin-top: 1rem;
    color: #f43f5e;
    font-size: 0.85rem;
    min-height: 1.2em;
}

/* ── Portal Grid ─────────────────────────────────────────────── */
.portal-section {
    width: 100%;
    animation: scaleIn 0.6s var(--transition) both;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.link-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.link-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

.link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--color-accent), transparent 60%);
    opacity: 0.05;
    transition: opacity 0.4s;
}

.link-card:hover::before {
    opacity: 0.15;
}

.link-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: transform 0.4s;
}

.link-card:hover .link-icon {
    transform: rotate(12deg) scale(1.1);
}

.link-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    font-family: var(--font-display);
}

.link-desc {
    font-size: 0.9rem;
    color: var(--text-600);
    line-height: 1.5;
}

.footer-actions {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-lg);
    color: var(--text-600);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border-color: rgba(244, 63, 94, 0.4);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-400);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-card);
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .container {
        padding-top: 4rem;
    }

    .portal-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }
}