:root {
    --bg-primary: #07070d;
    --bg-secondary: #0d0d1a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.07);

    --neon-pink: #ff2d95;
    --neon-cyan: #00f5ff;
    --neon-purple: #8b2cf5;
    --neon-green: #00ff87;

    --admin-glow: var(--neon-pink);
    --public-glow: var(--neon-cyan);

    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --text-muted: #55557a;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 2rem 1.5rem 4rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

.bg-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% -20%, rgba(139, 44, 245, 0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(0, 245, 255, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(255, 45, 149, 0.06) 0%, transparent 50%);
}

header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-shadow:
        0 0 10px rgba(255, 45, 149, 0.3),
        0 0 40px rgba(139, 44, 245, 0.15),
        0 0 80px rgba(139, 44, 245, 0.08);
    animation: fadeInDown 0.8s ease-out;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch::before {
    color: var(--neon-cyan);
    animation: glitchShift 4s infinite linear alternate-reverse;
}

.glitch::after {
    color: var(--neon-pink);
    animation: glitchShift 4s infinite linear alternate;
}

.subtitle {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    flex-wrap: wrap;
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    align-items: stretch;
    gap: 1.25rem;
    flex: 1;
    min-width: 280px;
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out both;
}

.public-section {
    animation-delay: 0.15s;
}

.section-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid;
    width: 100%;
}

.admin-title {
    color: var(--neon-pink);
    border-color: rgba(255, 45, 149, 0.25);
    text-shadow: 0 0 20px rgba(255, 45, 149, 0.15);
}

.public-title {
    color: var(--neon-cyan);
    border-color: rgba(0, 245, 255, 0.25);
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.15);
}

.redirect-card {
    position: relative;
    border-radius: var(--radius);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.admin-section .redirect-card:hover {
    transform: translateY(-4px);
    background: var(--glass-hover);
    box-shadow:
        0 0 20px rgba(255, 45, 149, 0.15),
        0 0 60px rgba(255, 45, 149, 0.06),
        inset 0 1px 0 rgba(255, 45, 149, 0.1);
    border-color: rgba(255, 45, 149, 0.25);
}

.public-section .redirect-card:hover {
    transform: translateY(-4px);
    background: var(--glass-hover);
    box-shadow:
        0 0 20px rgba(0, 245, 255, 0.15),
        0 0 60px rgba(0, 245, 255, 0.06),
        inset 0 1px 0 rgba(0, 245, 255, 0.1);
    border-color: rgba(0, 245, 255, 0.25);
}

.redirect-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-section .redirect-card::before {
    background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
}

.public-section .redirect-card::before {
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
}

.redirect-card:hover::before {
    left: 100%;
}

.link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: transform var(--transition), box-shadow var(--transition);
}

.admin-section .card-icon {
    background: rgba(255, 45, 149, 0.08);
    color: var(--neon-pink);
}

.public-section .card-icon {
    background: rgba(0, 245, 255, 0.08);
    color: var(--neon-cyan);
}

.redirect-card:hover .card-icon {
    transform: scale(1.1);
}

.admin-section .redirect-card:hover .card-icon {
    box-shadow: 0 0 16px rgba(255, 45, 149, 0.2);
}

.public-section .redirect-card:hover .card-icon {
    box-shadow: 0 0 16px rgba(0, 245, 255, 0.2);
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    width: 100%;
    background: rgba(7, 7, 13, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ---- Animations ---- */

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

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

@keyframes glitchShift {
    0% {
        opacity: 0;
        clip-path: inset(40% 0 61% 0);
        transform: translate(-2px, 2px);
    }
    5% {
        opacity: 0.6;
        clip-path: inset(40% 0 61% 0);
        transform: translate(-2px, 2px);
    }
    10% {
        opacity: 0;
        clip-path: inset(40% 0 61% 0);
        transform: translate(-2px, 2px);
    }
    15% {
        opacity: 0;
        clip-path: inset(20% 0 52% 0);
        transform: translate(2px, -1px);
    }
    20% {
        opacity: 0.5;
        clip-path: inset(20% 0 52% 0);
        transform: translate(2px, -1px);
    }
    25% {
        opacity: 0;
        clip-path: inset(20% 0 52% 0);
        transform: translate(2px, -1px);
    }
    30% {
        opacity: 0;
        clip-path: inset(58% 0 33% 0);
        transform: translate(-1px, 3px);
    }
    35% {
        opacity: 0.4;
        clip-path: inset(58% 0 33% 0);
        transform: translate(-1px, 3px);
    }
    40% {
        opacity: 0;
        clip-path: inset(58% 0 33% 0);
        transform: translate(-1px, 3px);
    }
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    body {
        padding: 1.5rem 1rem 4rem;
        justify-content: flex-start;
    }

    main {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .container {
        max-width: 100%;
        min-width: unset;
        grid-template-columns: 1fr;
    }

    .link {
        padding: 1rem 1.25rem;
    }

    .card-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .card-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        margin-bottom: 2rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1rem;
    }
}
