/* --- Imports --- */
@import url('/static/vendor/fontawesome/css/all.min.css');

/* --- Base Settings --- */
:root {
    --primary: #22c55e;
    --primary-glow: rgba(34, 197, 94, 0.4);
    --primary-border: rgba(34, 197, 94, 0.2);
    --bg-color: #030005;
    --text-color: #fff;
}

[data-theme="gold"] {
    --primary: #eab308;
    --primary-glow: rgba(234, 179, 8, 0.5);
    --primary-border: rgba(234, 179, 8, 0.3);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    width: 100%;
    font-family: 'Vazirmatn', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 0;
}

/* Selection */
::selection {
    background: var(--primary);
    color: #000;
}

/* --- Typography Classes --- */
.font-gothic {
    font-family: 'UnifrakturMaguntia', cursive;
}

.font-tech,
.font-eng {
    font-family: 'Russo One', sans-serif;
}

.font-metal {
    font-family: 'Metal Mania', system-ui;
}

.font-persian-title,
.font-title {
    font-family: 'Lalezar', system-ui;
    letter-spacing: 0;
}

.font-persian-body {
    font-family: 'Vazirmatn', sans-serif;
}

.font-mono-code {
    font-family: 'Courier Prime', monospace;
}

.accent-text {
    color: var(--primary);
    transition: color 0.4s ease;
}

/* --- Common Background Effects --- */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 50% 50%, rgba(20, 83, 45, 0.1), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(126, 34, 206, 0.05), transparent 30%);
    animation: pulse-glow 8s ease-in-out infinite alternate;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1));
    background-size: 100% 3px;
    pointer-events: none;
    z-index: 50;
    opacity: 0.4;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 49;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Animations --- */
@keyframes pulse-glow {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.8;
    }
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

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

/* Glitch Effect */
@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
        text-shadow: none;
    }

    20% {
        transform: skew(0deg);
        text-shadow: none;
    }

    21% {
        transform: skew(-2deg);
        text-shadow: 2px 2px 0 #ff00c1, -2px -2px 0 #00fff9;
    }

    22% {
        transform: skew(2deg);
        text-shadow: -2px -2px 0 #ff00c1, 2px 2px 0 #00fff9;
    }

    23% {
        transform: skew(0deg);
        text-shadow: none;
    }

    100% {
        transform: skew(0deg);
        text-shadow: none;
    }
}

.glitch-effect {
    animation: glitch-skew 4s infinite linear;
    position: relative;
}

/* --- Index Specific --- */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 200vh;
    background-image: linear-gradient(rgba(34, 197, 94, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    z-index: -3;
    animation: grid-move 20s linear infinite;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 90%);
}

@keyframes grid-move {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

.stripe-hover {
    background-size: 20px 20px;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.2) 10px, rgba(0, 0, 0, 0.2) 20px);
}

.scanner-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.2), transparent);
    transform: translateY(-100%);
    animation: scan-vertical 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes scan-vertical {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

/* --- Product Specific --- */
.theme-border {
    border: 1px solid var(--primary-border);
    box-shadow: 0 0 40px -10px var(--primary-glow);
    transition: all 0.5s ease;
}

.plan-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #27272a;
}

input:checked+.plan-card {
    border-color: var(--primary);
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.05), transparent);
    box-shadow: 0 0 15px var(--primary-glow) inset;
}

input:checked+.plan-card .check-icon {
    opacity: 1;
    transform: scale(1);
}

.btn-buy {
    position: relative;
    overflow: hidden;
    background: var(--primary);
    color: #000;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-2px);
}

@keyframes slowBreath {

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

    50% {
        opacity: 0.4;
        transform: scale(1.1);
    }
}

.bg-breathing-anim {
    animation: slowBreath 6s ease-in-out infinite;
}

/* --- MODAL UTILS --- */
#auth-modal.open {
    opacity: 1;
    pointer-events: auto;
}

#auth-modal.open #auth-modal-content {
    transform: scale(1);
}

/* Simple fade/slide animation for OTP panel */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fade-in-up 0.35s ease forwards;
}

/* OTP inputs */
.otp-input {
    letter-spacing: 0.05em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.otp-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* Password selection inputs: bigger, more spaced dots */
#auth-modal input.auth-password-input {
    font-size: 1.05rem;
    line-height: 1.6;
}

#auth-modal input.auth-password-input[type="password"] {
    letter-spacing: 0.32em;
    font-variant-ligatures: none;
}

#auth-modal input.auth-password-input[type="text"] {
    letter-spacing: normal;
}

/* --- Auth Modal Consistency --- */
#auth-modal {
    z-index: 100;
    font-family: 'Vazirmatn', sans-serif;
}

#auth-modal #auth-modal-content {
    max-width: 480px;
    border: 1px solid rgba(63, 63, 70, 0.8);
    background: linear-gradient(180deg, rgba(12, 12, 12, 0.95), rgba(5, 5, 5, 0.95));
}

#auth-modal .auth-step {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#auth-modal input[type="text"],
#auth-modal input[type="password"],
#auth-modal input[type="tel"] {
    font-family: 'Vazirmatn', sans-serif;
}

@media (max-width: 640px) {
    #auth-modal #auth-modal-content {
        max-width: 100%;
    }
}
