/* =====================================================================
   DOOM ONLINE - main stylesheet (shared by every page, cached by the browser)
   ===================================================================== */

:root {
    --gold: #ffd700;
    --gold-2: #f4c430;
    --red: #ff6b6b;
    --text: #ffffff;
    --muted: #d3d3d3;
    --panel: #1a1a1a;
    --bg-gradient: linear-gradient(135deg, #000000, #1a1a1a);
    --font-title: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    --font-main: 'Cinzel', Georgia, 'Times New Roman', serif;
    --font-ui: Arial, Helvetica, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000 var(--bg-gradient);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

a {
    color: var(--gold);
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

.site-main {
    flex: 1 0 auto;
    width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ---------- Header ---------- */
.header-container {
    position: relative;
    width: 100%;
}

.site-header {
    position: relative;
    width: 100%;
    height: 80vh;
    max-height: 600px;
    min-height: 400px;
    overflow: hidden;
}

.header-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
}

.top-bar {
    position: absolute;
    top: 10%;
    right: 5%;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar form {
    display: inline;
}

.top-bar .avatar {
    width: 70px;
    height: 70px;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.top-bar .avatar:hover {
    transform: scale(1.1);
}

.btn-login, .btn-signup, .btn-logout {
    display: inline-block;
    margin: 0 0.3rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    font-family: var(--font-title);
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.btn-login {
    background: #fff;
    color: #000;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.btn-login:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.9);
}

.btn-signup {
    background: #000;
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

.btn-signup:hover {
    transform: translateY(-2px);
    background: #1a1a1a;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.9);
}

.btn-logout {
    background: #ff6b6b;
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.6);
}

.btn-logout:hover {
    transform: translateY(-2px);
    background: #ff8585;
    box-shadow: 0 0 35px rgba(255, 107, 107, 0.9);
}

/* Gold call-to-action button */
.btn-register {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    background: linear-gradient(45deg, #fff, var(--gold-2));
    color: #000;
    font-family: var(--font-title);
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.btn-register:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, var(--gold-2), var(--gold));
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.9);
}

/* ---------- Main navigation ---------- */
.main-nav {
    position: relative;
    z-index: 100;
    width: 100%;
    background: #000;
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
}

.main-nav ul {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 2rem;
    padding: 1.2rem 4rem;
    list-style: none;
}

.main-nav ul::before, .main-nav ul::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-50%);
}

.main-nav ul::before {
    left: 20px;
}

.main-nav ul::after {
    right: 20px;
}

.main-nav a {
    position: relative;
    display: inline-block;
    padding: 0.6rem 1.2rem;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    transition: background 0.4s ease, color 0.4s ease;
}

.main-nav a.active {
    background: rgba(255, 215, 0, 0.12);
    box-shadow: inset 0 -2px 0 var(--gold);
}

/* The shaking hover effect only on devices with a real mouse (on phones a tap would leave it running) */
@media (hover: hover) and (pointer: fine) {
    .main-nav a:hover {
        background: rgba(255, 215, 0, 0.2);
        animation:
            shake-intense 0.3s linear infinite,
            shake-hard 0.15s linear 3s infinite,
            colorTransition 4s ease-in-out 1 forwards;
    }

    .main-nav a:hover::before,
    .main-nav a:hover::after {
        content: '';
        position: absolute;
        left: 50%;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #ff0000;
        pointer-events: none;
    }

    .main-nav a:hover::before {
        top: -15px;
        animation: redSpark 1s ease-out infinite;
    }

    .main-nav a:hover::after {
        top: 115%;
        animation: redSpark 1.5s ease-out infinite;
    }
}

.main-nav a:focus-visible {
    background: rgba(255, 215, 0, 0.2);
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

@keyframes colorTransition {
    0% {
        color: var(--gold);
        background: rgba(255, 215, 0, 0.2);
        text-shadow: 0 0 30px var(--gold), 0 0 15px var(--gold);
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), 0 0 20px rgba(255, 215, 0, 0.7);
    }
    50% {
        color: #ff4500;
        background: rgba(255, 69, 0, 0.3);
        text-shadow: 0 0 40px #ff4500, 0 0 20px #ff4500;
        box-shadow: 0 0 50px rgba(255, 69, 0, 0.8), 0 0 25px rgba(255, 69, 0, 0.7);
    }
    100% {
        color: #ff0000;
        background: rgba(255, 0, 0, 0.4);
        text-shadow: 0 0 50px #ff0000, 0 0 25px #ff0000;
        box-shadow: 0 0 60px rgba(255, 0, 0, 1), 0 0 30px rgba(255, 0, 0, 0.9);
    }
}

@keyframes shake-intense {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(4px); }
}

@keyframes shake-hard {
    0% { transform: translateX(0) rotate(0deg); }
    20% { transform: translateX(-10px) rotate(-4deg); }
    40% { transform: translateX(10px) rotate(4deg); }
    60% { transform: translateX(-12px) rotate(-5deg); }
    80% { transform: translateX(12px) rotate(5deg); }
    100% { transform: translateX(0) rotate(0deg); }
}

@keyframes redSpark {
    0% { opacity: 0; transform: translateX(-50%) translateY(0) scale(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(-50px) scale(1); box-shadow: 0 0 20px #ff0000, 0 0 30px #ff0000; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-100px) scale(0); }
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px var(--gold); }
    50% { text-shadow: 0 0 15px var(--red); }
    100% { text-shadow: 0 0 5px var(--gold); }
}

@keyframes iconGlow {
    0% { box-shadow: 0 0 5px var(--gold); }
    50% { box-shadow: 0 0 15px var(--red); }
    100% { box-shadow: 0 0 5px var(--gold); }
}

/* ---------- Flash message popup ---------- */
.popup {
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 3000;
    width: 320px;
    max-width: calc(100% - 32px);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    border-radius: 10px;
    background: rgba(45, 45, 45, 0.95);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
    pointer-events: none;
    animation: fadeInOut 5s ease-in-out forwards;
}

.popup.error {
    color: #ff4444;
    border: 2px solid #ff4444;
    background: rgba(0, 0, 0, 0.95);
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.8), 0 0 5px rgba(255, 68, 68, 0.6);
}

.popup.success {
    color: #00ff00;
    border: 2px solid #00ff00;
    background: rgba(0, 40, 0, 0.92);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.7), 0 0 5px rgba(0, 255, 0, 0.5);
}

@keyframes fadeInOut {
    0% { opacity: 0; visibility: visible; transform: translateX(-50%) translateY(-20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(-20px); }
}

/* ---------- Modals (login / sign up / reset) ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    padding: 20px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal.is-open {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.modal-content {
    position: relative;
    width: 350px;
    max-width: 100%;
    margin: auto;
    padding: 24px 20px 20px;
    border: 2px solid var(--gold);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    text-align: center;
}

.modal-wide {
    width: 1000px;
}

.modal-medium {
    width: 400px;
}

.modal-close {
    position: absolute;
    top: 6px;
    right: 12px;
    padding: 0 6px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
    color: var(--gold);
}

.modal h2 {
    margin-bottom: 10px;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 2rem;
    line-height: 1.2;
}

.modal p {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--gold);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: var(--font-ui);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7), 0 0 5px rgba(255, 215, 0, 0.8);
}

.form-group input::placeholder {
    color: var(--gold);
    opacity: 1;
    font-family: var(--font-main);
}

.form-btn {
    width: 100%;
    margin-top: 15px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background: var(--gold);
    color: #000;
    font-weight: bold;
    transition: background 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}

.form-btn:hover,
.form-btn:focus-visible {
    background: var(--red);
    color: #fff;
    box-shadow: 0 0 15px var(--gold);
}

.form-btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.link-btn {
    display: block;
    margin: 10px auto 0;
    border: 0;
    background: none;
    color: var(--gold);
    font-size: 0.9rem;
}

.link-btn:hover,
.link-btn:focus-visible {
    color: var(--red);
    text-decoration: underline;
}

.form-error {
    min-height: 1.2em;
    margin: -0.6rem 0 0.8rem;
    color: #ff6666;
    font-family: var(--font-ui);
    font-size: 0.9rem;
}

.signup-layout {
    display: flex;
    align-items: center;
    width: 100%;
}

.signup-image {
    flex: 2;
    padding: 20px;
}

.signup-image img {
    width: 90%;
    border-radius: 5px;
}

.signup-content {
    flex: 1;
    min-width: 280px;
    padding: 20px;
}

.recaptcha-box {
    display: flex;
    justify-content: center;
    min-height: 78px;
}

/* ---------- Footer ---------- */
.footer {
    padding: 40px 0 20px;
    background: linear-gradient(135deg, #000, #cd1a1a, #000);
    color: #fff;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.social-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    animation: iconGlow 2s ease infinite;
    transition: transform 0.3s, background-color 0.3s;
}

.social-icon:hover {
    transform: translateY(-5px);
}

.social-icon.facebook:hover { background-color: #3b5998; }
.social-icon.instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social-icon.discord:hover { background-color: #5865f2; }

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: #333;
    transition: fill 0.3s;
}

.social-icon:hover svg {
    fill: #fff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 30px;
    margin-bottom: 30px;
}

.footer-link {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
}

.footer-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.copyright {
    padding: 1rem;
    background: var(--panel);
    border-top: 2px solid var(--gold);
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

/* ---------- Cookie consent ---------- */
.cookie-consent {
    position: fixed;
    bottom: 30px;
    left: 50%;
    z-index: 900; /* under the login/sign-up windows so it never covers their buttons */
    display: none;
    width: 90%;
    max-width: 1100px;
    padding: 25px;
    border-radius: 12px;
    background: var(--panel);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.2);
    transform: translateX(-50%);
    animation: slideUp 0.5s ease-in-out;
}

.cookie-consent.is-visible {
    display: block;
}

.cookie-consent h3 {
    margin-bottom: 12px;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 1.6rem;
    text-align: center;
}

.cookie-consent p {
    margin-bottom: 20px;
    color: var(--muted);
    text-align: center;
}

.cookie-consent a {
    color: var(--gold);
    font-weight: bold;
    text-decoration: none;
}

.cookie-consent a:hover {
    color: var(--red);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.cookie-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background: linear-gradient(45deg, var(--gold), var(--gold-2));
    color: #1a1a1a;
}

.cookie-btn.accept:hover {
    background: linear-gradient(45deg, #ff6b6b, #ff8585);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.cookie-btn.decline {
    border: 1px solid var(--gold);
    background: #333;
    color: #fff;
}

.cookie-btn.decline:hover {
    background: #555;
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(100px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- Shared page parts ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.doom-title {
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(45deg, var(--gold), var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: var(--font-title);
    font-size: 3rem;
    line-height: 1.2;
    text-align: center;
    animation: textGlow 2s ease infinite;
}

.panel {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid var(--gold);
    border-radius: 15px;
    background: rgba(45, 45, 45, 0.8);
}

.emoji-glow {
    animation: textGlow 2s ease infinite;
}

/* Reveal-on-scroll (replaces the AOS library). Only elements below the fold are hidden by JS. */
.aos-reveal {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out !important;
}

.aos-hidden { opacity: 0; }
.aos-hidden[data-aos="fade-up"] { transform: translateY(60px); }
.aos-hidden[data-aos="fade-left"] { transform: translateX(60px); }
.aos-hidden[data-aos="fade-right"] { transform: translateX(-60px); }

/* =====================================================================
   HOME
   ===================================================================== */
.page-home .site-main {
    padding: 2rem 1rem;
}

.welcome-container,
.community-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 50vh;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.9);
}

.community-container {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-card,
.community-card {
    width: 100%;
    max-width: 1300px;
    padding: clamp(1rem, 5vw, 4rem);
    border: 2px solid var(--gold);
    border-radius: 15px;
    background-color: #000;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.community-card {
    padding: clamp(1rem, 5vw, 2.5rem);
}

.welcome-image {
    display: block;
    margin: 0 auto 1rem;
    border-radius: 10px;
}

.welcome-text,
.community-text {
    text-align: center;
}

.welcome-text p,
.community-text p {
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.community-text h2 {
    margin-bottom: 1rem;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.community-text p {
    margin: 0 auto 1.5rem;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
    border-bottom: 3px solid #fff;
    background: #000;
    text-align: left;
}

.hero h2 {
    margin-left: 1rem;
    color: #fff;
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.25;
    text-shadow: 0 0 20px #fff;
}

.hero p {
    margin: 1rem 0 0 1rem;
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.text-section {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.62);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.text-section:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.text-container {
    flex: 2;
    padding: 0 1rem;
}

.text-container h3 {
    color: var(--gold);
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
}

.text-container p {
    margin-top: 0.75rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.5;
}

.image-container {
    flex: 1;
    text-align: center;
}

.image-container img {
    border-radius: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.4s ease;
}

.image-container img:hover {
    transform: scale(1.05);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 1rem;
    padding: 2rem 1rem;
}

.bottom-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.bottom-row .character-card {
    width: clamp(200px, 30%, 300px);
}

.character-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border: 2px solid var(--gold);
    border-radius: 15px;
    background: rgba(26, 26, 26, 0.9);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.character-card .card-inner {
    animation: breathe 3s ease-in-out infinite;
}

.character-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    z-index: 0;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(0, 0, 0, 0) 60%);
    transition: top 0.6s ease-in-out, left 0.6s ease-in-out;
}

.character-card:hover::before {
    top: 0;
    left: 0;
}

.character-card:hover {
    transform: translateY(-5px);
    background: rgba(45, 45, 45, 0.9);
    box-shadow: 0 0 50px #ffd700, 0 0 80px rgba(255, 107, 107, 0.7);
}

.character-card:hover .card-inner {
    animation: none;
}

.character-card img {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 10px;
    transition: transform 0.4s ease;
}

.character-card:hover img {
    transform: scale(1.05);
}

.character-card h3 {
    position: relative;
    z-index: 1;
    margin: 0.75rem 0 0.25rem;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.character-card:hover h3 {
    background: linear-gradient(45deg, #ffd700, #ff6b6b, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.profile-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.image-section {
    flex: 1;
    text-align: center;
}

.image-section img {
    width: 100%;
    max-width: 400px;
    border: 5px solid var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    object-fit: cover;
}

.profile-text {
    flex: 1;
    text-align: left;
}

.profile-text h2 {
    margin-bottom: 0.5rem;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.3;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.profile-text h3 {
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.profile-text p {
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.download-btn,
.join-btn {
    display: inline-block;
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    border-radius: 5px;
    background-color: var(--gold);
    color: #000;
    font-family: var(--font-title);
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    transition: all 0.4s ease;
}

.download-btn:hover,
.join-btn:hover {
    background-color: var(--red);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(255, 107, 107, 0.9);
}

/* =====================================================================
   LATEST NEWS
   ===================================================================== */
.page-news {
    background-image:
        radial-gradient(circle at 15% 50%, rgba(45, 45, 45, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(255, 215, 0, 0.15) 0%, transparent 40%),
        var(--bg-gradient);
}

.news-page {
    position: relative;
    max-width: 90%;
    margin: 0 auto;
    padding: clamp(10px, 2vw, 20px);
    font-family: 'Poppins', var(--font-ui);
}

.news-header {
    position: relative;
    margin: 2rem 0 clamp(40px, 5vw, 70px);
    text-align: center;
}

.news-header h1 {
    margin-bottom: clamp(10px, 2vw, 15px);
    color: var(--gold);
    font-family: 'Orbitron', var(--font-ui);
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.news-header::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 50%;
    width: clamp(100px, 12vw, 150px);
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform: translateX(-50%);
}

.news-subtitle {
    max-width: 90%;
    margin: 0 auto;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    opacity: 0.8;
}

.timeline {
    position: relative;
    margin-top: clamp(30px, 4vw, 50px);
    padding-bottom: clamp(30px, 4vw, 50px);
    --line-x: clamp(30px, 12vw, 150px);
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--line-x);
    z-index: 1;
    width: 4px;
    margin-left: -2px;
    background: linear-gradient(to bottom, var(--gold), var(--red));
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
}

.timeline-line::before,
.timeline-line::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    transform: translateX(-50%);
}

.timeline-line::before { top: -6px; }
.timeline-line::after { bottom: -6px; }

.timeline-item {
    position: relative;
    display: flex;
    margin-bottom: clamp(50px, 8vw, 100px);
    opacity: 0;
    animation: slideIn 0.8s ease forwards;
    animation-delay: calc(var(--index, 0) * 0.2s);
}

.timeline-date {
    position: relative;
    width: var(--line-x);
    padding-top: clamp(0px, 1vw, 15px);
    padding-right: clamp(10px, 2vw, 30px);
    color: var(--gold);
    font-size: clamp(0.8rem, 1.8vw, 1.1rem);
    font-weight: 600;
    text-align: right;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.timeline-marker {
    position: absolute;
    top: clamp(10px, 1.5vw, 15px);
    left: var(--line-x);
    z-index: 2;
    width: clamp(16px, 2vw, 24px);
    height: clamp(16px, 2vw, 24px);
    border: 3px solid var(--panel);
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2), 0 0 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    background: var(--red);
    transform: translateX(-50%) scale(1.3);
}

.timeline-content {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    margin-left: clamp(20px, 4vw, 50px);
    overflow: hidden;
    border: 2px solid var(--gold);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.95), rgba(26, 26, 26, 0.9));
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.3), inset 0 0 10px rgba(255, 107, 107, 0.2);
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.timeline-item:hover .timeline-content {
    border-color: var(--red);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 107, 107, 0.4);
}

.timeline-image {
    display: flex;
    justify-content: center;
    align-items: center;
    height: clamp(200px, 30vw, 500px);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.timeline-image img {
    width: clamp(200px, 30vw, 500px);
    height: clamp(200px, 30vw, 500px);
    object-fit: contain;
    transition: transform 0.7s ease;
}

.timeline-item:hover .timeline-image img {
    transform: scale(1.05);
}

.timeline-text {
    padding: clamp(15px, 2vw, 25px);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
}

.timeline-title {
    position: relative;
    display: inline-block;
    margin-bottom: clamp(10px, 1.5vw, 15px);
    color: var(--gold);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transition: color 0.3s ease;
}

.timeline-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    transition: width 0.4s ease;
}

.timeline-item:hover .timeline-title { color: var(--red); }
.timeline-item:hover .timeline-title::after { width: 100%; }

.timeline-description {
    margin-bottom: clamp(15px, 2vw, 20px);
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    line-height: 1.6;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.8)); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* =====================================================================
   RANKING
   ===================================================================== */
.page-ranking .doom-title {
    color: var(--gold);
    background: none;
}

.ranking-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ranking-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--gold);
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    font-family: Verdana, var(--font-ui);
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ranking-btn:hover {
    background-color: var(--gold);
    color: #000;
    transform: scale(1.05);
}

.ranking-btn.active {
    background-color: var(--gold);
    color: #000;
    font-weight: bold;
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
}

.responsive-table thead tr {
    background: rgba(45, 45, 45, 0.8);
}

.responsive-table th,
.responsive-table td {
    padding: 1rem;
    border: 1px solid var(--gold);
    text-align: center;
}

.responsive-table tbody tr:nth-child(-n+3) td:first-child {
    color: var(--gold);
    font-weight: bold;
}

.table-note {
    margin-top: 1rem;
    color: #aaa;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-align: center;
}

/* =====================================================================
   DOWNLOAD
   ===================================================================== */
.download-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4vw 2vw;
    text-align: center;
}

.requirements-title,
.download-title {
    color: var(--gold);
    font-family: var(--font-title);
    letter-spacing: 2px;
    line-height: 1.2;
    text-transform: uppercase;
}

.requirements-title {
    margin-bottom: 10px;
    font-size: clamp(2rem, 6vw, 3.5rem);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.5);
    animation: goldGlow 2.5s ease-in-out infinite alternate;
}

@keyframes goldGlow {
    from { text-shadow: 0 0 10px rgba(255, 215, 0, 0.7); }
    to { text-shadow: 0 0 20px rgba(255, 180, 0, 0.9); }
}

.subtitle {
    max-width: 800px;
    margin: 0 auto 50px;
    color: #c0c0c0;
    font-size: 1.2rem;
}

.requirements-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.requirements-column {
    flex: 1;
    min-width: min(350px, 100%);
    padding: 30px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 15px;
    background: rgba(15, 15, 15, 0.8);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.requirements-column:hover {
    border-color: #fff5c7;
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 215, 0, 0.5);
}

.requirements-column h2 {
    margin-bottom: 25px;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 2rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.spec-table tr {
    transition: background-color 0.3s ease;
}

.spec-table tr:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

.spec-table th,
.spec-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
    color: #ccc;
    font-weight: normal;
}

.spec-table th {
    width: 40%;
    color: #fff;
    font-weight: bold;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
    border-bottom: none;
}

.spec-table tr:hover td { color: #fff; }
.spec-table tr:hover th { color: var(--gold); }

.download-title {
    margin: 80px 0 2rem;
    font-size: clamp(2rem, 8vw, 4rem);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.download-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    border: 2px solid var(--gold);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    text-align: left;
}

.download-box p {
    margin-bottom: 1rem;
    font-weight: bold;
}

.download-box ul {
    margin-bottom: 2rem;
    list-style: none;
}

.download-box li {
    margin-bottom: 0.5rem;
}

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-page {
    max-width: 95%;
    margin: 0 auto;
    padding: 4vw 2vw;
}

.page-title {
    margin-bottom: 3vw;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-align: center;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    text-transform: uppercase;
}

.contact-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1rem, 5vw, 5rem);
    margin: 3vw 0;
}

.contact-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.4s ease;
}

.contact-icon img {
    width: clamp(80px, 15vw, 190px);
    height: clamp(80px, 15vw, 190px);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    transition: transform 0.4s ease, filter 0.4s ease;
}

.contact-icon span {
    margin-top: 0.5rem;
    color: var(--gold);
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.contact-icon:hover {
    transform: translateY(-5px);
}

.contact-icon:hover img {
    filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.9));
    transform: scale(1.1);
}

.contact-icon:hover span {
    color: var(--red);
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.7);
}

/* =====================================================================
   ABOUT / PRIVACY / TERMS / USAGE
   ===================================================================== */
.legal-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.legal-box {
    padding: 40px;
    border: 2px solid var(--gold);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.legal-box h1 {
    margin-bottom: 20px;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 2.5rem;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    text-transform: uppercase;
}

.legal-box h2 {
    margin: 20px 0 10px;
    color: var(--red);
    font-size: 1.5rem;
}

.legal-box p,
.legal-box ul {
    margin-bottom: 15px;
    text-align: justify;
}

.legal-box ul {
    padding-left: 1.5rem;
}

.legal-box li {
    margin-bottom: 0.4rem;
}

.legal-box.about p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.highlight {
    color: var(--red);
    font-weight: bold;
}

/* =====================================================================
   404
   ===================================================================== */
.page-404 {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.error-box {
    max-width: 600px;
    padding: 20px;
}

.error-title {
    margin-bottom: 1rem;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 4rem;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.error-image {
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
    transition: transform 0.4s ease;
}

.error-image:hover {
    transform: scale(1.05);
}

.error-message {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.btn-home {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    background: linear-gradient(45deg, var(--gold), var(--red));
    color: #000;
    font-family: var(--font-title);
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    transition: all 0.4s ease;
}

.btn-home:hover {
    background: linear-gradient(45deg, var(--red), var(--gold));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.9);
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1280px) {
    .site-header {
        height: 70vh;
        min-height: 350px;
    }

    .top-bar {
        top: 8%;
        right: 3%;
        gap: 0.5rem;
    }

    .btn-login, .btn-signup, .btn-logout {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .top-bar .avatar {
        width: 60px;
        height: 60px;
    }

    .main-nav ul {
        gap: 0.4rem 1rem;
    }
}

@media (max-width: 1024px) {
    .text-section,
    .profile-container {
        flex-direction: column;
        text-align: center;
    }

    .text-section:nth-of-type(even) {
        flex-direction: column-reverse;
    }

    .text-container,
    .image-container {
        padding: 1rem 0;
    }

    .profile-text {
        text-align: center;
    }

    .timeline {
        --line-x: clamp(20px, 8vw, 100px);
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 60vh;
        min-height: 300px;
    }

    .top-bar {
        top: 5%;
        right: 2%;
        gap: 0.3rem;
    }

    .btn-login, .btn-signup, .btn-logout {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .top-bar .avatar {
        width: 50px;
        height: 50px;
    }

    .main-nav {
        clip-path: none;
    }

    .main-nav ul {
        gap: 0.2rem 0.4rem;
        padding: 0.8rem 0.5rem;
    }

    .main-nav ul::before,
    .main-nav ul::after {
        display: none;
    }

    .main-nav a {
        padding: 0.45rem 0.7rem;
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .signup-layout {
        flex-direction: column;
    }

    .signup-image {
        display: none;
    }

    .signup-content {
        min-width: 0;
        width: 100%;
        padding: 10px 0 0;
    }

    .doom-title {
        font-size: 2rem;
    }

    .welcome-card,
    .community-card {
        padding: 1rem;
    }

    .hero h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

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

    .bottom-row .character-card {
        width: 100%;
    }

    .timeline {
        --line-x: 30px;
    }

    .timeline-date {
        position: absolute;
        top: -30px;
        left: 60px;
        width: auto;
        padding: 0;
        text-align: left;
    }

    .timeline-content {
        margin-left: 60px;
    }

    .timeline-image {
        height: clamp(150px, 45vw, 300px);
    }

    .timeline-image img {
        width: clamp(150px, 45vw, 300px);
        height: clamp(150px, 45vw, 300px);
    }

    .ranking-btn {
        margin: 5px;
        padding: 8px 15px;
        font-size: 14px;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        margin-bottom: 1rem;
    }

    .responsive-table td {
        position: relative;
        padding-left: 50%;
        text-align: left;
    }

    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        font-weight: bold;
    }

    .panel {
        padding: 1rem;
    }

    .download-page,
    .contact-page {
        padding: 6vw 3vw;
    }

    .download-box {
        max-width: 100%;
        padding: 1.5rem;
    }

    .contact-icons {
        flex-direction: column;
        gap: 6vw;
    }

    .legal-box {
        padding: 20px;
    }

    .legal-box h1 {
        font-size: 2rem;
    }

    .legal-box h2 {
        font-size: 1.3rem;
    }

    .cookie-consent {
        bottom: 15px;
        padding: 15px;
    }

    .cookie-consent h3 {
        font-size: 1.3rem;
    }

    .cookie-consent p {
        font-size: 0.9rem;
    }

    .cookie-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
    }

    .error-title {
        font-size: 2.5rem;
    }

    .error-message {
        font-size: 1.2rem;
    }

    .error-image {
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    .top-bar {
        top: 12px;
        right: 8px;
    }

    .popup {
        top: 64px;
    }

    .modal {
        padding: 10px;
    }

    .modal h2 {
        font-size: 1.6rem;
    }

    .profile-text h2,
    .community-text h2 {
        font-size: 1.25rem;
    }

    .download-btn,
    .join-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .ranking-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .responsive-table td {
        font-size: 14px;
    }

    .timeline {
        --line-x: 15px;
    }

    .timeline-date {
        left: 40px;
        font-size: 0.8rem;
    }

    .timeline-content {
        margin-left: 40px;
    }
}

@media (min-width: 1200px) {
    .page-home .site-main {
        padding: 3rem;
    }

    .welcome-container,
    .community-container {
        padding: 2rem;
    }
}


/* =====================================================================
   ANIMATIONS & EFFECTS
   ===================================================================== */

/* ---------- Banner: slow cinematic zoom + rising embers ---------- */
.header-image {
    animation: kenburns 28s ease-in-out infinite alternate;
    transform-origin: 50% 40%;
    will-change: transform;
}

@keyframes kenburns {
    from { transform: scale(1); }
    to { transform: scale(1.12) translateY(-1.5%); }
}

.embers {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.ember {
    position: absolute;
    bottom: -12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffb347;
    box-shadow: 0 0 6px 2px rgba(255, 120, 0, 0.8), 0 0 14px 4px rgba(255, 60, 0, 0.35);
    opacity: 0;
    animation: ember-rise linear infinite;
}

@keyframes ember-rise {
    0% { opacity: 0; transform: translate(0, 0) scale(1); }
    10% { opacity: 1; }
    50% { transform: translate(var(--drift, 30px), -45vh) scale(0.8); }
    85% { opacity: 0.7; }
    100% { opacity: 0; transform: translate(calc(var(--drift, 30px) * -0.5), -90vh) scale(0.3); }
}

.top-bar {
    animation: drop-in 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.3) both 0.2s;
}

@keyframes drop-in {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: none; }
}

.main-nav li {
    animation: nav-in 0.6s ease-out both;
}

.main-nav li:nth-child(1) { animation-delay: 0.05s; }
.main-nav li:nth-child(2) { animation-delay: 0.12s; }
.main-nav li:nth-child(3) { animation-delay: 0.19s; }
.main-nav li:nth-child(4) { animation-delay: 0.26s; }
.main-nav li:nth-child(5) { animation-delay: 0.33s; }
.main-nav li:nth-child(6) { animation-delay: 0.40s; }

@keyframes nav-in {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: none; }
}

.main-nav ul::before,
.main-nav ul::after {
    animation: orb-glow 3s ease-in-out infinite;
}

@keyframes orb-glow {
    0%, 100% { box-shadow: 0 0 6px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 22px rgba(255, 215, 0, 0.95), inset 0 0 10px rgba(255, 215, 0, 0.6); }
}

.nav-badge {
    display: inline-block;
    min-width: 20px;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ff3b3b;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    line-height: 20px;
    text-align: center;
    vertical-align: middle;
    animation: badge-pulse 1.6s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.7); }
    50% { box-shadow: 0 0 0 7px rgba(255, 59, 59, 0); }
}

/* ---------- Buttons: wiggle + shine sweep + click ripple ---------- */
.btn-login, .btn-signup, .btn-logout, .btn-register, .download-btn, .join-btn, .form-btn,
.pay-submit, .ranking-btn, .btn-home, .cookie-btn, .admin-back, .copy-btn, .admin-links a,
.pay-form button, .admin-search button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-login::after, .btn-signup::after, .btn-logout::after, .btn-register::after, .download-btn::after,
.join-btn::after, .form-btn::after, .pay-submit::after, .ranking-btn::after, .btn-home::after,
.cookie-btn::after, .admin-back::after, .admin-links a::after, .pay-form button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    z-index: -1;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .btn-login:hover, .btn-signup:hover, .btn-logout:hover, .btn-register:hover, .download-btn:hover,
    .join-btn:hover, .form-btn:hover, .pay-submit:hover, .ranking-btn:hover, .btn-home:hover,
    .cookie-btn:hover, .admin-back:hover, .admin-links a:hover, .pay-form button:hover {
        animation: btn-wiggle 0.5s ease-in-out 2;
    }

    .btn-login:hover::after, .btn-signup:hover::after, .btn-logout:hover::after, .btn-register:hover::after,
    .download-btn:hover::after, .join-btn:hover::after, .form-btn:hover::after, .pay-submit:hover::after,
    .ranking-btn:hover::after, .btn-home:hover::after, .cookie-btn:hover::after, .admin-back:hover::after,
    .admin-links a:hover::after, .pay-form button:hover::after {
        animation: shine 0.9s ease-out;
    }
}

@keyframes btn-wiggle {
    0%, 100% { transform: translateY(-2px) rotate(0deg); }
    25% { transform: translateY(-2px) translateX(-2px) rotate(-1.5deg); }
    75% { transform: translateY(-2px) translateX(2px) rotate(1.5deg); }
}

@keyframes shine {
    from { left: -75%; }
    to { left: 130%; }
}

/* Call-to-action buttons shine by themselves every few seconds */
.download-btn::after, .join-btn::after, .btn-register::after, .pay-submit::after {
    animation: shine 1.2s ease-out 2s infinite;
    animation-delay: 2.5s;
}

.download-btn, .join-btn, .btn-register {
    animation: cta-glow 2.4s ease-in-out infinite;
}

@keyframes cta-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.95), 0 0 50px rgba(255, 107, 107, 0.35); }
}

.ripple {
    position: absolute;
    z-index: -1;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transform: scale(0);
    animation: ripple 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple {
    to { transform: scale(18); opacity: 0; }
}

/* ---------- Titles ---------- */
.doom-title {
    background-size: 200% auto;
    background-image: linear-gradient(90deg, #ffd700, #ff6b6b, #fff3b0, #ffd700);
    animation: textGlow 2s ease infinite, gradient-move 4s linear infinite;
}

@keyframes gradient-move {
    to { background-position: 200% center; }
}

.pay-title, .page-title, .requirements-title, .legal-box h1, .news-header h1, .error-title {
    animation: title-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both, title-glow 3s ease-in-out 1s infinite;
}

@keyframes title-in {
    from { opacity: 0; letter-spacing: 0.35em; filter: blur(6px); }
    to { opacity: 1; filter: blur(0); }
}

@keyframes title-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 24px rgba(255, 215, 0, 0.95), 0 0 40px rgba(255, 107, 107, 0.4); }
}

.hero {
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 30%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 215, 0, 0.12), transparent);
    transform: skewX(-20deg);
    animation: hero-sweep 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hero-sweep {
    0%, 60% { left: -40%; }
    100% { left: 120%; }
}

/* ---------- 3D tilt (set by JavaScript) ---------- */
.tilt {
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

/* ---------- Modals & popups ---------- */
.modal.is-open {
    animation: fade-in 0.25s ease-out;
}

.modal.is-open .modal-content {
    animation: modal-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(40px) scale(0.92); }
    to { opacity: 1; transform: none; }
}

.modal-content {
    animation-fill-mode: both;
}

.modal-content::before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 12px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #ffd700);
    background-size: 200% 100%;
    filter: blur(8px);
    opacity: 0.55;
    animation: gradient-move 3s linear infinite;
    pointer-events: none;
}

/* ---------- Scroll progress + back to top ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2500;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #ffd700);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    transform: scaleX(0);
    transform-origin: 0 50%;
    pointer-events: none;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 950;
    width: 48px;
    height: 48px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.85);
    color: var(--gold);
    font-size: 22px;
    line-height: 1;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    animation: iconGlow 2s ease infinite;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--gold);
    color: #000;
}

/* ---------- Celebration (Silk received) ---------- */
.confetti {
    position: fixed;
    top: -20px;
    z-index: 4000;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    pointer-events: none;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    to { transform: translate(var(--x, 0), 105vh) rotate(var(--r, 720deg)); opacity: 0.9; }
}

/* ---------- Footer ---------- */
.footer {
    background-size: 200% 200%;
    animation: footer-flow 12s ease-in-out infinite;
}

@keyframes footer-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.social-icons .social-icon:nth-child(1) { animation: iconGlow 2s ease infinite, float 3s ease-in-out infinite; }
.social-icons .social-icon:nth-child(2) { animation: iconGlow 2s ease infinite, float 3s ease-in-out 0.4s infinite; }
.social-icons .social-icon:nth-child(3) { animation: iconGlow 2s ease infinite, float 3s ease-in-out 0.8s infinite; }

@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
}

.contact-icon img {
    animation: float 4s ease-in-out infinite;
}

.contact-icon:nth-child(2) img { animation-delay: 0.6s; }
.contact-icon:nth-child(3) img { animation-delay: 1.2s; }

/* ---------- Ranking ---------- */
.responsive-table tbody tr {
    animation: row-in 0.5s ease-out both;
}

.responsive-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.responsive-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.responsive-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.responsive-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.responsive-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.responsive-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.responsive-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.responsive-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.responsive-table tbody tr:nth-child(n+9) { animation-delay: 0.45s; }

@keyframes row-in {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: none; }
}

.responsive-table tbody tr {
    transition: background 0.3s ease;
}

.responsive-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.12);
}

.medal {
    display: inline-block;
    font-size: 1.4em;
    animation: medal-bounce 2s ease-in-out infinite;
}

@keyframes medal-bounce {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-4px) rotate(-8deg); }
}

/* =====================================================================
   RESPONSIVE - every screen size (phones, landscape phones, tablets,
   laptops, Full HD, 2K / 4K monitors)
   ===================================================================== */

/* Banner height follows the screen width, so wide monitors see the whole picture */
.site-header {
    height: clamp(350px, 42vw, 82vh);
    max-height: none;
    min-height: 0;
}

/* Laptops & small desktops: keep the 6 menu items on one line */
@media (max-width: 1280px) and (min-width: 769px) {
    .main-nav ul {
        gap: 0.3rem 0.5rem;
        padding: 1rem 4.5rem;
    }

    .main-nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.95rem;
        letter-spacing: 1.5px;
    }
}

/* Tablets */
@media (max-width: 1024px) and (min-width: 769px) {
    .main-nav a {
        padding: 0.45rem 0.6rem;
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .main-nav ul::before,
    .main-nav ul::after {
        width: 28px;
        height: 28px;
        left: 14px;
    }

    .main-nav ul::after {
        left: auto;
        right: 14px;
    }
}

/* Phones (portrait) */
@media (max-width: 768px) {
    .site-header {
        height: 60vh;
        min-height: 300px;
        max-height: 520px;
    }
}

/* Phones turned sideways (landscape): don't let the banner fill the whole screen */
@media (max-height: 500px) and (orientation: landscape) {
    .site-header {
        height: 72vh;
        min-height: 200px;
    }

    .top-bar {
        top: 10px;
    }

    .modal {
        padding: 8px;
    }

    .modal-content {
        padding: 16px 14px 14px;
    }

    .modal h2 {
        font-size: 1.4rem;
    }

    .modal p {
        margin-bottom: 10px;
    }

    .form-group {
        margin-bottom: 0.8rem;
    }

    .signup-image {
        display: none;
    }

    .cookie-consent {
        bottom: 8px;
        padding: 10px 14px;
    }

    .cookie-consent h3 {
        display: none;
    }

    .cookie-consent p {
        margin-bottom: 8px;
        font-size: 0.85rem;
    }
}

/* ---------- Phone menu (☰ button) ---------- */
.nav-toggle {
    display: none;
}

@media (max-width: 600px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        width: 100%;
        padding: 0.85rem 1rem;
        border: 0;
        background: none;
        color: var(--gold);
        font-family: var(--font-title);
        font-size: 1rem;
        letter-spacing: 3px;
        text-transform: uppercase;
    }

    .nav-toggle-icon {
        position: relative;
        width: 24px;
        height: 16px;
    }

    .nav-toggle-icon span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: var(--gold);
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.7);
        transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
    }

    .nav-toggle-icon span:nth-child(1) { top: 0; }
    .nav-toggle-icon span:nth-child(2) { top: 7px; }
    .nav-toggle-icon span:nth-child(3) { top: 14px; }

    .main-nav.nav-open .nav-toggle-icon span:nth-child(1) { top: 7px; transform: rotate(45deg); }
    .main-nav.nav-open .nav-toggle-icon span:nth-child(2) { opacity: 0; }
    .main-nav.nav-open .nav-toggle-icon span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

    .nav-current {
        color: #fff;
        font-size: 0.8rem;
        letter-spacing: 1px;
        opacity: 0.85;
    }

    /* JavaScript adds .nav-ready; without JavaScript the menu simply stays open */
    .main-nav.nav-ready ul {
        display: none;
    }

    .main-nav.nav-ready.nav-open ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        padding: 0 0.8rem 1rem;
        animation: menu-open 0.35s ease-out;
    }

    .main-nav.nav-open li {
        animation: nav-in 0.4s ease-out both;
    }

    .main-nav.nav-open a {
        display: block;
        padding: 0.75rem 0.4rem;
        border: 1px solid rgba(255, 215, 0, 0.35);
        border-radius: 8px;
        font-size: 0.85rem;
        text-align: center;
    }

    .main-nav.nav-open a.active {
        border-color: var(--gold);
    }

    @keyframes menu-open {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: none; }
    }
}

/* ---------- Small phones (iPhone SE, 320-360px) ---------- */
@media (max-width: 360px) {
    .btn-login, .btn-signup, .btn-logout {
        padding: 0.3rem 0.5rem;
        font-size: 0.72rem;
        letter-spacing: 0.5px;
    }

    .top-bar .avatar {
        width: 42px;
        height: 42px;
    }

    .doom-title {
        font-size: 1.6rem;
    }
}

/* Long words / numbers never push the page wider than the screen */
.pay-page,
.admin-page,
.legal-box,
.timeline-description {
    overflow-wrap: break-word;
}

/* ---------- Big monitors: use the extra space ---------- */
@media (min-width: 1800px) {
    html {
        font-size: 112.5%;
    }

    .container,
    .legal-page,
    .download-page,
    .profile-container,
    .community-container {
        max-width: 1450px;
    }

    .pay-page {
        max-width: 1250px;
    }

    .admin-page {
        max-width: 1550px;
    }

    .welcome-card {
        max-width: 1500px;
    }
}

@media (min-width: 2400px) {
    html {
        font-size: 131.25%;
    }

    .container,
    .legal-page,
    .download-page,
    .profile-container,
    .community-container {
        max-width: 1800px;
    }

    .pay-page {
        max-width: 1550px;
    }

    .admin-page {
        max-width: 1900px;
    }

    .welcome-card {
        max-width: 1850px;
    }

    .top-bar .avatar {
        width: 96px;
        height: 96px;
    }
}

/* =====================================================================
   BUY SILK + ADMIN (v3)
   ===================================================================== */
[hidden] {
    display: none !important;
}

.ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

.pay-page,
.admin-page {
    width: 100%;
    max-width: 1120px;
    margin: 1.5rem auto 4rem;
    padding: 0 1rem;
    font-family: var(--font-ui);
    overflow-wrap: anywhere;
}

.admin-page {
    max-width: 1280px;
}

/* ---------- Hero ---------- */
.pay-hero {
    margin: 1.5rem 0 1.5rem;
    text-align: center;
}

.pay-title {
    margin-bottom: 0.4rem;
    color: var(--gold);
    font-family: var(--font-title);
    font-size: clamp(2rem, 6vw, 2.9rem);
    line-height: 1.2;
    text-transform: uppercase;
}

.pay-subtitle {
    margin-bottom: 1rem;
    color: #ddd;
    font-size: 1.05rem;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    list-style: none;
}

.trust-row li {
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.06);
    color: #eee;
    font-size: 0.88rem;
}

/* ---------- Alerts ---------- */
.pay-alert {
    margin: 1rem 0;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    line-height: 1.6;
}

.pay-ok { border: 1px solid #38e477; background: linear-gradient(135deg, #123d24, #0d2a19); }
.pay-bad { border: 1px solid #ff5b5b; background: linear-gradient(135deg, #4d1919, #321010); }
.pay-info { border: 1px solid rgba(255, 215, 0, 0.6); background: #1c1a10; color: #ffe57a; }

.pay-notice {
    animation: modal-in 0.5s ease-out;
}

.live-note {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.live-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #45e27b;
    box-shadow: 0 0 0 0 rgba(69, 226, 123, 0.7);
    animation: badge-pulse 1.4s ease-in-out infinite;
}

/* ---------- Login card (guests) ---------- */
.login-card {
    max-width: 520px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    background: radial-gradient(circle at top, rgba(255, 215, 0, 0.14), transparent 60%), linear-gradient(160deg, #1d1d1d, #0b0b0b);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.15);
    text-align: center;
}

.login-card-icon {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 2.6rem;
}

.login-card h2 {
    margin-bottom: 0.4rem;
    color: var(--gold);
}

.login-card p {
    margin-bottom: 1.3rem;
    color: #ccc;
}

.login-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
}

.login-card-actions .pay-submit,
.ghost-btn {
    min-width: 150px;
    width: auto;
}

.ghost-btn {
    padding: 0.85rem 1.4rem;
    border: 1px solid var(--gold);
    border-radius: 10px;
    background: transparent;
    color: var(--gold);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.ghost-btn:hover {
    background: var(--gold);
    color: #000;
}

/* ---------- Admin shortcuts on the Buy page ---------- */
.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 0.7rem;
    margin: 1rem 0;
}

.admin-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(69, 226, 123, 0.6);
    border-radius: 12px;
    background: rgba(69, 226, 123, 0.08);
    color: #7dffa9;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.admin-links a:hover {
    background: rgba(69, 226, 123, 0.18);
    transform: translateY(-2px);
}

/* ---------- Wallet ---------- */
.silk-wallet {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0 1.2rem;
    padding: 1.1rem 1.4rem;
    border: 1px solid rgba(255, 215, 0, 0.7);
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(255, 215, 0, 0.16), rgba(10, 10, 10, 0.95) 45%, rgba(255, 107, 107, 0.12));
    background-size: 200% 200%;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.2);
    animation: footer-flow 10s ease-in-out infinite;
}

.wallet-account {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.wallet-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #4a3a00, #120e00);
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: bold;
}

.wallet-label {
    display: block;
    color: #aaa;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.wallet-account strong {
    font-size: 1.35rem;
}

.wallet-balance {
    text-align: end;
}

.wallet-balance strong {
    color: var(--gold);
    font-size: 2.1rem;
    line-height: 1.2;
    text-shadow: 0 0 14px rgba(255, 215, 0, 0.6);
}

.wallet-gem {
    font-size: 1.5rem;
}

.balance-pop {
    display: inline-block;
    animation: balance-pop 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.6);
}

@keyframes balance-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.3); color: #45e27b; }
    100% { transform: scale(1); }
}

/* ---------- Steps ---------- */
.step-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 2rem 0 1rem;
    color: var(--gold);
    font-size: 1.35rem;
}

.step-title > span:first-child {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold);
    color: #000;
    font-size: 1.05rem;
    animation: orb-glow 3s ease-in-out infinite;
}

/* ---------- Packages ---------- */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 230px));
    justify-content: center;
    gap: 1rem;
}

.package-grid.is-single {
    grid-template-columns: minmax(0, 320px);
}

.package-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.4rem 1rem 1.2rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 18px;
    background: radial-gradient(circle at top, rgba(255, 215, 0, 0.1), transparent 65%), linear-gradient(160deg, #222, #0d0d0d);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.package-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.package-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.package-card.is-selected {
    border-color: var(--gold);
    background: radial-gradient(circle at top, rgba(255, 215, 0, 0.25), transparent 65%), linear-gradient(160deg, #3a2f00, #111);
    animation: selected-glow 2.4s ease-in-out infinite;
}

.package-card:focus-within {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

@keyframes selected-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 28px rgba(255, 215, 0, 0.85); }
}

.package-check {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    color: transparent;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.25s ease;
}

.package-card.is-selected .package-check {
    border-color: var(--gold);
    background: var(--gold);
    color: #000;
}

.package-gem {
    margin-bottom: 0.2rem;
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(120, 200, 255, 0.6));
    animation: float 3.5s ease-in-out infinite;
}

.package-silk {
    color: #fff;
    font-size: 2.1rem;
    font-weight: bold;
    line-height: 1.1;
}

.package-unit {
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 3px;
}

.package-prices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.price-chip {
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(69, 226, 123, 0.12);
    color: #5ff08f;
    font-size: 0.9rem;
    font-weight: bold;
}

.package-badge {
    position: absolute;
    top: -11px;
    padding: 2px 10px;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    font-size: 0.72rem;
    text-transform: uppercase;
    animation: badge-pulse 1.8s ease-in-out infinite;
}

/* ---------- Payment methods ---------- */
.pay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 1.4rem;
    align-items: stretch;
}

.pay-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.4rem;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(38, 38, 38, 0.97), rgba(12, 12, 12, 0.97));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.method-etisalat { border-top: 4px solid #e4002b; }
.method-paypal { border-top: 4px solid #009cde; }

.method-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.method-head > div {
    flex: 1;
    min-width: 0;
}

.method-head h2 {
    color: #fff;
    font-size: 1.3rem;
}

.pay-card-sub {
    color: #aaa;
    font-size: 0.88rem;
}

.method-logo,
.history-icon {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 1.15rem;
    font-weight: bold;
    direction: ltr;
}

.logo-et { background: linear-gradient(135deg, #e4002b, #8a0019); }
.logo-pp { background: linear-gradient(135deg, #009cde, #003087); font-style: italic; font-size: 1.5rem; }

.method-tag {
    flex: 0 0 auto;
    padding: 0.2rem 0.65rem;
    border: 1px solid #555;
    border-radius: 999px;
    color: #ccc;
    font-size: 0.75rem;
    white-space: nowrap;
}

.method-tag.tag-instant {
    border-color: rgba(69, 226, 123, 0.6);
    color: #5ff08f;
}

.stepper {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 0 0 1rem;
    list-style: none;
}

.stepper li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #e6e6e6;
    line-height: 1.6;
}

.stepper li > div {
    flex: 1;
    min-width: 0;
}

.step-num {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: bold;
}

.stepper strong {
    color: var(--gold);
}

.pay-number {
    margin: 0.7rem 0 0.2rem;
    padding: 1rem;
    border: 1px dashed rgba(69, 226, 123, 0.7);
    border-radius: 14px;
    background: #0b140e;
    text-align: center;
}

.pay-number strong {
    display: block;
    color: #fff;
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    letter-spacing: 2px;
}

.copy-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.copy-btn,
.copy-mini {
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: transparent;
    color: var(--gold);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.copy-mini {
    padding: 0.1rem 0.55rem;
    font-size: 0.75rem;
}

.copy-btn:hover,
.copy-mini:hover,
.copy-btn.copied {
    background: var(--gold);
    color: #000;
}

.pay-form {
    margin-top: auto;
}

.pay-form label {
    display: block;
    margin: 0.9rem 0 0.35rem;
    color: var(--gold);
    font-size: 0.95rem;
}

.pay-form input,
.unlock-form input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #555;
    border-radius: 10px;
    background: #0f0f0f;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pay-form input:focus,
.unlock-form input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.field-hint {
    display: block;
    min-height: 1.2em;
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

.field-hint.ok { color: #45e27b; }
.field-hint.bad { color: #ff8c8c; }

.pay-submit,
.pay-form button {
    width: 100%;
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffe45c, var(--gold) 50%, #e6a800);
    color: #000;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(255, 215, 0, 0.3);
}

.pay-submit:hover,
.pay-form button:hover {
    filter: brightness(1.08);
}

.pay-price {
    margin: 0 0 1rem;
    color: #45e27b;
    font-size: 2.2rem;
    font-weight: bold;
    text-align: center;
}

.pay-price small {
    color: #8fd9a8;
    font-size: 1rem;
}

.sandbox-note {
    margin: 0 0 0.5rem;
    padding: 0.45rem;
    border: 1px dashed #ffb347;
    border-radius: 8px;
    color: #ffb347;
    font-size: 0.85rem;
    text-align: center;
}

.setup-box {
    padding: 1rem;
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    background: #2a2200;
    line-height: 1.7;
}

#paypal-button-container {
    margin-top: 0.8rem;
}

.pp-message {
    display: none;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    line-height: 1.6;
}

.pp-message.is-visible {
    display: block;
    animation: modal-in 0.4s ease-out;
}

.pp-loading {
    opacity: 0.65;
    pointer-events: none;
}

.flash-value {
    display: inline-block;
    animation: balance-pop 0.6s ease-out;
}

/* ---------- Payment history ---------- */
.history {
    margin-top: 2.2rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    list-style: none;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 1rem;
    border: 1px solid #2f2f2f;
    border-radius: 14px;
    background: linear-gradient(160deg, #1b1b1b, #101010);
    animation: row-in 0.5s ease-out both;
}

.history-item:hover {
    border-color: rgba(255, 215, 0, 0.4);
}

.history-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1rem;
}

.history-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.history-main small {
    color: #999;
    font-size: 0.8rem;
}

.history-id {
    color: #888;
    font-weight: normal;
}

.history-note {
    color: #ffd27a !important;
}

.history-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: end;
}

.history-amount strong {
    color: var(--gold);
}

.history-amount small {
    color: #aaa;
    font-size: 0.8rem;
}

.empty-state {
    padding: 2rem 1rem;
    border: 1px dashed #444;
    border-radius: 16px;
    color: #aaa;
    text-align: center;
}

.empty-state span {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 2rem;
}

/* ---------- Status badges ---------- */
.status-pill {
    display: inline-block;
    padding: 0.18rem 0.75rem;
    border: 1px solid #555;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ddd;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.status-pill.status-PENDING,
.status-pill.status-PROCESSING,
.status-pill.status-CREATED { border-color: rgba(255, 215, 0, 0.5); background: rgba(255, 215, 0, 0.12); color: var(--gold); }
.status-pill.status-PENDING,
.status-pill.status-PROCESSING { animation: badge-pulse-gold 2s ease-in-out infinite; }
.status-pill.status-APPROVED,
.status-pill.status-COMPLETED { border-color: rgba(69, 226, 123, 0.5); background: rgba(69, 226, 123, 0.13); color: #45e27b; }
.status-pill.status-REJECTED,
.status-pill.status-FAILED,
.status-pill.status-DECLINED,
.status-pill.status-REFUNDED { border-color: rgba(255, 102, 102, 0.5); background: rgba(255, 102, 102, 0.13); color: #ff6b6b; }
.status-pill.status-ABANDONED { border-color: #444; background: transparent; color: #888; }

.status-changed {
    animation: balance-pop 0.8s ease-out;
}

@keyframes badge-pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0); }
}

/* ---------- Admin ---------- */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0 1.4rem;
    padding: 0.35rem;
    border: 1px solid #333;
    border-radius: 14px;
    background: #0e0e0e;
}

.admin-tabs a {
    display: inline-flex;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    color: #ccc;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-tabs a:hover {
    background: #1d1d1d;
    color: #fff;
}

.admin-tabs a.active {
    background: var(--gold);
    color: #000;
}

.admin-head {
    margin-bottom: 1rem;
}

.admin-head h1,
.admin-page h1 {
    color: var(--gold);
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.3;
}

.admin-sub {
    margin-top: 0.3rem;
    color: #bbb;
    line-height: 1.6;
}

.admin-sub strong {
    color: #fff;
}

.admin-section-title,
.admin-page h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.8rem 0 0.9rem;
    color: var(--gold);
    font-size: 1.25rem;
}

.count-chip {
    padding: 0.05rem 0.6rem;
    border-radius: 999px;
    background: #2a2a2a;
    color: #fff;
    font-size: 0.85rem;
}

.mode-badge,
.test-badge {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.mode-test,
.test-badge { background: #ffb347; color: #000; }
.mode-live { background: #45e27b; color: #000; }

.test-badge {
    margin-inline-start: 0.3rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
    gap: 0.9rem;
    margin: 0.5rem 0 1rem;
}

.stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.1rem;
    overflow: hidden;
    border: 1px solid #333;
    border-radius: 16px;
    background: linear-gradient(160deg, #1d1d1d, #0d0d0d);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--accent, var(--gold));
}

[dir="rtl"] .stat-card::before {
    inset: 0 0 0 auto;
}

.stat-gold { --accent: var(--gold); }
.stat-green { --accent: #45e27b; }
.stat-blue { --accent: #5aa9ff; }
.stat-purple { --accent: #b58cff; }
.stat-red { --accent: #ff5b5b; }

.stat-icon {
    position: absolute;
    top: 0.8rem;
    inset-inline-end: 0.9rem;
    font-size: 1.4rem;
    opacity: 0.8;
}

.stat-value {
    color: var(--accent, var(--gold));
    font-size: 1.9rem;
    font-weight: bold;
    line-height: 1.2;
}

.stat-label {
    color: #aaa;
    font-size: 0.85rem;
}

/* Pending Etisalat requests as cards */
.request-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
    gap: 1rem;
}

.request-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.1rem;
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 18px;
    background: linear-gradient(160deg, #1f1f1f, #0f0f0f);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.08);
    animation: row-in 0.5s ease-out both;
}

.request-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.request-id {
    color: var(--gold);
    font-weight: bold;
}

.request-age {
    color: #999;
    font-size: 0.85rem;
}

.request-amount {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem;
}

.request-amount strong {
    color: #45e27b;
    font-size: 1.7rem;
}

.request-amount span {
    color: #ddd;
}

.request-facts {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.request-facts > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    background: #151515;
}

.request-facts dt {
    min-width: 80px;
    color: #999;
    font-size: 0.85rem;
}

.request-facts dd {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: #fff;
}

.request-facts small {
    color: #999;
}

.request-facts code,
.data-table code {
    padding: 0.05rem 0.35rem;
    border-radius: 5px;
    background: #262626;
    color: #ffe57a;
    font-size: 0.85rem;
    word-break: break-all;
}

.request-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.check-tag {
    display: inline-block;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.check-good { background: rgba(69, 226, 123, 0.16); color: #45e27b; }
.check-info { background: rgba(255, 255, 255, 0.09); color: #ddd; }
.check-warn { background: rgba(255, 179, 71, 0.16); color: #ffb347; }
.check-bad { background: rgba(255, 102, 102, 0.16); color: #ff6b6b; }

.request-form input[type=text] {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid #444;
    border-radius: 10px;
    background: #0d0d0d;
    color: #fff;
}

.request-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.approve-btn,
.reject-btn,
.check-btn {
    padding: 0.7rem 0.8rem;
    border: 0;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.approve-btn { background: linear-gradient(135deg, #5ff08f, #2fbf64); color: #002b10; }
.reject-btn { background: transparent; border: 1px solid #ff6b6b; color: #ff6b6b; }
.check-btn { background: #1d2a3a; border: 1px solid #5aa9ff; color: #9ccbff; white-space: nowrap; }

.approve-btn:hover,
.check-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.reject-btn:hover { background: rgba(255, 107, 107, 0.15); }

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.admin-toolbar .admin-section-title {
    margin: 0;
}

.admin-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-search input,
.admin-search select {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid #444;
    border-radius: 10px;
    background: #111;
    color: #fff;
}

.admin-search select {
    flex: 0 1 140px;
}

.admin-search button {
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: 10px;
    background: var(--gold);
    color: #000;
    font-weight: bold;
    cursor: pointer;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-tabs a {
    padding: 0.45rem 0.95rem;
    border: 1px solid #444;
    border-radius: 999px;
    color: #ccc;
    font-size: 0.9rem;
    text-decoration: none;
}

.filter-tabs a.active,
.filter-tabs a:hover {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.12);
    color: var(--gold);
}

/* Tables */
.table-wrap {
    margin: 0.8rem 0 1rem;
    overflow-x: auto;
    border: 1px solid #333;
    border-radius: 16px;
    background: rgba(16, 16, 16, 0.97);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid #262626;
    text-align: start;
    vertical-align: middle;
}

.data-table thead th {
    position: sticky;
    top: 0;
    background: #161616;
    color: var(--gold);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.04);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table small {
    color: #999;
}

.empty-cell {
    padding: 2rem !important;
    color: #999;
    text-align: center !important;
}

.row-dim td {
    opacity: 0.55;
}

.id-cell span {
    display: block;
    color: #999;
    font-size: 0.78rem;
    white-space: nowrap;
}

.payer-cell {
    max-width: 220px;
    font-size: 0.88rem;
    word-break: break-all;
}

.silk-sent {
    display: block;
    margin-top: 0.2rem;
    color: #45e27b !important;
}

.action-cell {
    text-align: end !important;
}

.table-note {
    color: #888;
    font-size: 0.85rem;
}

/* Setup Check */
.check-table .check-icon {
    width: 44px;
    font-size: 1.3rem;
    text-align: center !important;
}

.check-table td:nth-child(2) {
    width: 32%;
}

.check-table tr.check-ok .check-icon { color: #45e27b; }
.check-table tr.check-warn .check-icon { color: #ffb347; }
.check-table tr.check-fail .check-icon { color: #ff5b5b; }
.check-table tr.check-info .check-icon { color: #8ab4ff; }
.check-table tr.check-fail { background: rgba(255, 91, 91, 0.08); }
.check-table tr.check-warn { background: rgba(255, 179, 71, 0.05); }

.check-help {
    margin-top: 0.4rem;
    color: #ffd27a;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 0.92rem;
    line-height: 1.7;
    text-align: right;
}

.check-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.2rem 0;
}

.log-box {
    max-height: 320px;
    overflow: auto;
    padding: 1rem;
    border: 1px solid #333;
    border-radius: 12px;
    background: #0b0b0b;
    color: #ccc;
    font-size: 0.8rem;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Admin e-mail code */
.unlock-card {
    max-width: 460px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    background: linear-gradient(160deg, #1d1d1d, #0b0b0b);
    text-align: center;
}

.unlock-icon {
    font-size: 2.6rem;
}

.unlock-card p {
    margin: 0.5rem 0 1rem;
    color: #ccc;
}

.unlock-sent {
    color: #ffe57a !important;
}

.unlock-form input {
    font-size: 1.6rem;
    letter-spacing: 0.5rem;
    text-align: center;
}

.unlock-resend .link-btn {
    margin-top: 0.8rem;
    color: #aaa;
}

/* Admin tables become cards on phones */
@media (max-width: 760px) {
    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        padding: 0.6rem 0.2rem;
        border-bottom: 1px solid #2a2a2a;
    }

    .admin-table td {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.6rem;
        padding: 0.35rem 0.8rem;
        border: 0;
        text-align: end;
    }

    .admin-table td::before {
        content: attr(data-label);
        color: #888;
        font-size: 0.8rem;
        text-align: start;
    }

    .admin-table td.action-cell::before,
    .admin-table td.empty-cell::before {
        content: none;
    }

    .admin-table td.empty-cell {
        justify-content: center;
    }

    .payer-cell {
        max-width: none;
    }

    .id-cell span {
        white-space: normal;
    }

    .check-table td:nth-child(2) {
        width: auto;
    }

    .request-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .silk-wallet {
        padding: 1rem;
    }

    .wallet-balance {
        width: 100%;
        text-align: start;
    }

    .history-item {
        flex-wrap: wrap;
    }

    .history-item .status-pill {
        margin-inline-start: 54px;
    }

    .method-head {
        flex-wrap: wrap;
    }

    .pay-card {
        padding: 1.1rem;
    }

    .admin-tabs a {
        flex: 1 1 45%;
        font-size: 0.9rem;
    }

    .back-to-top {
        right: 12px;
        bottom: 14px;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 360px) {
    .pay-title {
        font-size: 1.6rem;
    }

    .package-silk {
        font-size: 1.6rem;
    }

    .wallet-balance strong {
        font-size: 1.7rem;
    }
}

@media (min-width: 1800px) {
    .pay-page { max-width: 1300px; }
    .admin-page { max-width: 1550px; }
}

/* =====================================================================
   LANGUAGE SWITCH + ARABIC (right to left)
   ===================================================================== */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 215, 0, 0.8);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--gold);
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: bold;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-switch:hover {
    background: var(--gold);
    color: #000;
    transform: translateY(-2px);
}

.lang-switch[lang="en"] {
    font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 600px) {
    .lang-switch {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .lang-globe {
        display: none;
    }
}

/* Arabic fonts. Letter spacing breaks Arabic letters, so it is turned off everywhere */
html[lang="ar"] {
    --font-title: 'El Messiri', 'Cairo', Tahoma, serif;
    --font-main: 'Cairo', Tahoma, Arial, sans-serif;
    --font-ui: 'Cairo', Tahoma, Arial, sans-serif;
}

html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .main-nav a,
html[lang="ar"] .doom-title,
html[lang="ar"] .pay-title,
html[lang="ar"] .btn-login,
html[lang="ar"] .btn-signup,
html[lang="ar"] .btn-logout,
html[lang="ar"] .btn-register,
html[lang="ar"] .btn-home {
    font-family: var(--font-title);
}

html[lang="ar"] *,
html[lang="ar"] *::before,
html[lang="ar"] *::after {
    letter-spacing: 0 !important;
}

html[lang="ar"] .main-nav a {
    font-size: 1.15rem;
    text-transform: none;
}

html[lang="ar"] .ltr,
html[lang="ar"] [dir="ltr"],
html[lang="ar"] code,
html[lang="ar"] .log-box {
    font-family: Arial, Helvetica, sans-serif;
}

html[lang="ar"] .title-in,
html[lang="ar"] .pay-title,
html[lang="ar"] .page-title,
html[lang="ar"] .requirements-title,
html[lang="ar"] .legal-box h1,
html[lang="ar"] .news-header h1,
html[lang="ar"] .error-title {
    animation: title-glow 3s ease-in-out 1s infinite;
}

/* Mirror the parts that are placed on one side */
[dir="rtl"] .top-bar { right: auto; left: 5%; }
[dir="rtl"] .top-bar .avatar { margin-left: 0; margin-right: 10px; }
[dir="rtl"] .modal-close { right: auto; left: 12px; }
[dir="rtl"] .back-to-top { right: auto; left: 20px; }
[dir="rtl"] .nav-badge { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .hero,
[dir="rtl"] .profile-text,
[dir="rtl"] .spec-table,
[dir="rtl"] .download-box,
[dir="rtl"] .legal-box,
[dir="rtl"] .timeline-text { text-align: right; }
[dir="rtl"] .hero h2 { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .legal-box ul { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .timeline-line { left: auto; right: var(--line-x); margin-left: 0; margin-right: -2px; }
[dir="rtl"] .timeline-marker { left: auto; right: var(--line-x); transform: translateX(50%); }
[dir="rtl"] .timeline-item:hover .timeline-marker { transform: translateX(50%) scale(1.3); }
[dir="rtl"] .timeline-date { padding-right: 0; padding-left: clamp(10px, 2vw, 30px); text-align: left; }
[dir="rtl"] .timeline-content { margin-left: 0; margin-right: clamp(20px, 4vw, 50px); }
[dir="rtl"] .timeline-title::after { left: auto; right: 0; background: linear-gradient(270deg, var(--gold), transparent); }
[dir="rtl"] .check-help { text-align: right; }

@media (max-width: 768px) {
    [dir="rtl"] .timeline-date { left: auto; right: 60px; text-align: right; padding: 0; }
    [dir="rtl"] .timeline-content { margin-right: 60px; margin-left: 0; }
    [dir="rtl"] .responsive-table td { padding-left: 10px; padding-right: 50%; text-align: right; }
    [dir="rtl"] .responsive-table td::before { left: auto; right: 10px; padding-right: 0; padding-left: 10px; }
}

@media (max-width: 600px) {
    [dir="rtl"] .back-to-top { left: 12px; }
}

@media (max-width: 480px) {
    [dir="rtl"] .timeline-date { right: 40px; }
    [dir="rtl"] .timeline-content { margin-right: 40px; }
}

/* ---------- fine tuning (v3) ---------- */
.stat-card {
    padding-inline-end: 3rem;
}

.stat-value[dir="ltr"] {
    text-align: start;
}

[dir="rtl"] .stat-value[dir="ltr"] {
    text-align: right;
}

.admin-table td:first-child,
.admin-table small,
.admin-table .ltr,
.id-cell code {
    white-space: nowrap;
}

.pp-table .check-btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
}

.history-item .status-pill {
    min-width: 128px;
    text-align: center;
}

@media (max-width: 600px) {
    .package-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .package-grid.is-single {
        grid-template-columns: minmax(0, 280px);
    }

    .package-card {
        padding: 1.2rem 0.6rem 1rem;
    }

    .package-silk {
        font-size: 1.7rem;
    }

    .history-item .status-pill {
        min-width: 0;
    }
}

.toolbar-form .check-btn {
    padding: 0.5rem 0.9rem;
}

.status-pill.status-REVERSED,
.status-pill.status-REVOKED {
    border-color: rgba(255, 102, 102, 0.6);
    background: rgba(255, 102, 102, 0.15);
    color: #ff6b6b;
}

.action-cell form + form {
    margin-top: 0.4rem;
}

/* =====================================================================
   INFO PAGES: About, Contact, Privacy, Terms, Usage (v4)
   ===================================================================== */
.icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.25em;
}

[dir="rtl"] .flip-rtl,
[dir="rtl"] .list-dot .legal-bullet .icon {
    transform: scaleX(-1);
}

.info-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
    font-family: var(--font-ui);
    line-height: 1.75;
}

/* ---------- Hero ---------- */
.info-hero {
    position: relative;
    margin: 1.5rem 0 1.8rem;
    padding: 2.6rem 1.2rem 2.2rem;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 215, 0, 0.28), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(255, 107, 107, 0.16), transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(90, 169, 255, 0.12), transparent 45%),
        linear-gradient(160deg, #1c1c1c, #090909);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
}

.info-hero::after {
    content: '';
    position: absolute;
    inset: auto 10% 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.7;
}

.info-crumbs {
    position: absolute;
    top: 0.9rem;
    inset-inline-start: 1.2rem;
    display: flex;
    gap: 0.45rem;
    color: #888;
    font-size: 0.82rem;
}

.info-crumbs a {
    color: #bbb;
    text-decoration: none;
}

.info-crumbs a:hover {
    color: var(--gold);
}

.info-hero-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 84px;
    height: 84px;
    margin: 0.6rem 0 1rem;
    border: 2px solid rgba(255, 215, 0, 0.8);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.22), rgba(255, 215, 0, 0.04));
    color: var(--gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.35);
    transform: rotate(-6deg);
    animation: info-float 5s ease-in-out infinite;
}

.info-hero-icon .icon {
    width: 44px;
    height: 44px;
}

@keyframes info-float {
    0%, 100% { transform: rotate(-6deg) translateY(0); }
    50% { transform: rotate(-2deg) translateY(-6px); }
}

.info-title {
    margin-bottom: 0.4rem;
    background: linear-gradient(90deg, #fff3a6, var(--gold), #ffb347);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: var(--font-title);
    font-size: clamp(1.9rem, 5.5vw, 3rem);
    line-height: 1.25;
}

.info-subtitle {
    max-width: 640px;
    margin: 0 auto;
    color: #d6d6d6;
    font-size: clamp(1rem, 2.4vw, 1.15rem);
}

.info-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.3rem 0.9rem;
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.4);
    color: #aaa;
    font-size: 0.85rem;
}

/* ---------- Buttons ---------- */
.info-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
    padding: 0.75rem 1.4rem;
    border: 1px solid var(--gold);
    border-radius: 12px;
    color: var(--gold);
    font-weight: bold;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.info-btn:hover {
    background: var(--gold);
    color: #000;
    transform: translateY(-2px);
}

.info-btn-gold {
    background: linear-gradient(135deg, #ffe45c, var(--gold) 50%, #e6a800);
    color: #000;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.info-btn-gold:hover {
    filter: brightness(1.08);
    box-shadow: 0 10px 28px rgba(255, 215, 0, 0.45);
}

.info-btn-discord {
    border-color: #5865f2;
    background: #5865f2;
    color: #fff;
}

.info-btn-discord:hover {
    background: #6d78ff;
    color: #fff;
}

/* ---------- "In short" ---------- */
.info-summary {
    margin-bottom: 1.8rem;
    padding: 1.3rem 1.4rem;
    border: 1px solid rgba(69, 226, 123, 0.45);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(69, 226, 123, 0.1), rgba(10, 10, 10, 0.9) 60%);
}

.info-summary h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: #5ff08f;
    font-size: 1.15rem;
}

.info-summary ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 0.7rem;
    list-style: none;
}

.info-summary li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #eee;
    line-height: 1.5;
}

.info-summary-icon {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(69, 226, 123, 0.15);
    color: #5ff08f;
}

/* ---------- Legal layout ---------- */
.legal-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: start;
    gap: 1.6rem;
}

.legal-toc {
    position: sticky;
    top: 1rem;
    padding: 1rem;
    border: 1px solid #2e2e2e;
    border-radius: 18px;
    background: rgba(18, 18, 18, 0.95);
}

.legal-toc summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
    font-weight: bold;
    cursor: pointer;
    list-style: none;
}

.legal-toc summary::-webkit-details-marker {
    display: none;
}

.legal-toc ol {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.7rem;
    list-style: none;
}

.legal-toc a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.55rem;
    border-radius: 10px;
    color: #bbb;
    font-size: 0.92rem;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.legal-toc a:hover,
.legal-toc a.is-active {
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold);
}

.toc-num {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid #444;
    border-radius: 50%;
    font-size: 0.75rem;
}

.legal-toc a.is-active .toc-num {
    border-color: var(--gold);
    background: var(--gold);
    color: #000;
}

.legal-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legal-card {
    scroll-margin-top: 1rem;
    padding: 1.4rem 1.5rem;
    border: 1px solid #2c2c2c;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.97), rgba(12, 12, 12, 0.97));
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.legal-card:hover,
.legal-card:target {
    border-color: rgba(255, 215, 0, 0.45);
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.1);
}

.legal-card-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.8rem;
}

.legal-card-icon {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.06));
    color: var(--gold);
}

.legal-card-icon .icon {
    width: 24px;
    height: 24px;
}

.legal-card h2 {
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.4;
}

.legal-num {
    color: var(--gold);
}

.legal-card p {
    margin-bottom: 0.7rem;
    color: #d9d9d9;
}

.legal-card a:not(.info-btn) {
    color: var(--gold);
}

.legal-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.4rem 0 0.8rem;
    list-style: none;
}

.legal-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: #e2e2e2;
    line-height: 1.6;
}

.legal-list b {
    color: #fff;
}

.legal-bullet {
    display: inline-flex;
    flex: 0 0 auto;
    margin-top: 0.15rem;
    color: var(--gold);
}

.list-check .legal-bullet { color: #45e27b; }
.list-ban .legal-bullet { color: #ff6b6b; }

.legal-note {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-inline-start: 3px solid #ffb347;
    border-radius: 10px;
    background: rgba(255, 179, 71, 0.08);
    color: #ffd9a0 !important;
}

.legal-note .icon {
    margin-top: 0.2rem;
    color: #ffb347;
}

/* Enforcement ladder */
.legal-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0.6rem 0 0.4rem;
    list-style: none;
}

.legal-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.7rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    text-align: center;
}

.legal-steps li.step-1 { border-top: 3px solid #ffb347; }
.legal-steps li.step-2 { border-top: 3px solid #ff8c42; }
.legal-steps li.step-3 { border-top: 3px solid #ff5b5b; }

.legal-step-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.step-1 .legal-step-icon { color: #ffb347; }
.step-2 .legal-step-icon { color: #ff8c42; }
.step-3 .legal-step-icon { color: #ff5b5b; }

.legal-steps strong {
    color: #fff;
}

.legal-steps small {
    color: #aaa;
    line-height: 1.5;
}

/* ---------- About ---------- */
.info-highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.8rem;
}

.info-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.1rem 0.8rem;
    border: 1px solid #2e2e2e;
    border-radius: 18px;
    background: linear-gradient(160deg, #1d1d1d, #0e0e0e);
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-highlight:hover {
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-4px);
}

.info-highlight-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    border-radius: 16px;
    background: rgba(255, 215, 0, 0.12);
    color: var(--gold);
}

.info-highlight-icon .icon {
    width: 26px;
    height: 26px;
}

.info-highlight strong {
    color: #fff;
    font-size: 1.05rem;
}

.info-highlight small {
    color: #999;
    font-size: 0.85rem;
    line-height: 1.4;
}

.about-story {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 1.6rem;
    margin-bottom: 2.2rem;
    padding: 1.6rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(32, 32, 32, 0.97), rgba(10, 10, 10, 0.97));
}

.about-story h2,
.mission-card h2,
.tips-card h2,
.faq-card h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: var(--gold);
    font-size: 1.35rem;
}

.about-story p {
    margin-bottom: 0.9rem;
    color: #ddd;
}

.about-story-image img {
    display: block;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.25);
}

.info-section-title {
    margin: 0 0 1rem;
    color: var(--gold);
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2.2rem;
}

.feature-card {
    padding: 1.4rem;
    border: 1px solid #2c2c2c;
    border-radius: 18px;
    background: linear-gradient(160deg, #1d1d1d, #0d0d0d);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.12);
    transform: translateY(-5px);
}

.feature-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 0.8rem;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--gold), #e09b00);
    color: #000;
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.3);
}

.feature-icon .icon {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    margin-bottom: 0.4rem;
    color: #fff;
    font-size: 1.15rem;
}

.feature-card p {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.65;
}

.mission-card {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 2.2rem;
    padding: 1.6rem;
    border: 1px solid rgba(90, 169, 255, 0.4);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(90, 169, 255, 0.12), rgba(10, 10, 10, 0.95) 60%);
}

.mission-icon {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(90, 169, 255, 0.18);
    color: #8cc4ff;
}

.mission-icon .icon {
    width: 32px;
    height: 32px;
}

.mission-card h2 {
    color: #8cc4ff;
}

.mission-card p {
    color: #ddd;
}

.info-cta {
    padding: 2.2rem 1.2rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 215, 0, 0.3), transparent 60%),
        linear-gradient(135deg, #3a0d0d, #120606);
    border: 1px solid rgba(255, 107, 107, 0.4);
    text-align: center;
}

.info-cta h2 {
    margin-bottom: 0.3rem;
    color: #fff;
    font-family: var(--font-title);
    font-size: clamp(1.4rem, 4vw, 2rem);
}

.info-cta p {
    margin-bottom: 1rem;
    color: #ddd;
}

.info-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

/* ---------- Contact ---------- */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.channel-card {
    --brand: var(--gold);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.8rem 1.2rem 1.4rem;
    overflow: hidden;
    border: 1px solid #2e2e2e;
    border-radius: 22px;
    background: linear-gradient(160deg, #1d1d1d, #0c0c0c);
    color: #ddd;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.channel-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--brand);
}

.channel-card:hover {
    border-color: var(--brand);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 30px color-mix(in srgb, var(--brand) 35%, transparent);
    transform: translateY(-6px);
}

.channel-discord { --brand: #5865f2; }
.channel-facebook { --brand: #1877f2; }
.channel-instagram { --brand: #e1306c; }

.channel-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 0.8rem;
    border-radius: 22px;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease;
}

.channel-instagram .channel-icon {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.channel-card:hover .channel-icon {
    transform: scale(1.08) rotate(-4deg);
}

.channel-icon .icon {
    width: 40px;
    height: 40px;
}

.channel-name {
    color: #fff;
    font-size: 1.35rem;
}

.channel-text {
    flex: 1;
    margin: 0.3rem 0 1rem;
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.6;
}

.channel-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border: 1px solid var(--brand);
    border-radius: 999px;
    color: #fff;
    font-weight: bold;
    transition: background 0.25s ease;
}

.channel-card:hover .channel-button {
    background: var(--brand);
}

.channel-badge {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(69, 226, 123, 0.15);
    color: #5ff08f;
    font-size: 0.75rem;
    font-weight: bold;
}

.contact-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
    gap: 1rem;
}

.tips-card,
.faq-card {
    padding: 1.5rem;
    border: 1px solid #2c2c2c;
    border-radius: 20px;
    background: linear-gradient(160deg, #1c1c1c, #0d0d0d);
}

.tips-card p {
    color: #ccc;
}

.tips-card ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.8rem 0;
    list-style: none;
}

.tips-card li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #e6e6e6;
    line-height: 1.5;
}

.tip-icon {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 215, 0, 0.12);
    color: var(--gold);
}

.tips-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 91, 91, 0.1);
    color: #ffb0b0 !important;
    line-height: 1.6;
}

.tips-warning .icon {
    margin-top: 0.2rem;
    color: #ff6b6b;
}

.faq-item {
    border-bottom: 1px solid #2a2a2a;
}

.faq-item:last-child {
    border-bottom: 0;
}

.faq-item summary {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0.2rem;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary > span:nth-child(2) {
    flex: 1;
}

.faq-icon {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(90, 169, 255, 0.15);
    color: #8cc4ff;
}

.faq-chevron {
    color: #888;
    transition: transform 0.25s ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: var(--gold);
}

.faq-item summary:hover {
    color: var(--gold);
}

.faq-item p {
    padding: 0 0.2rem 1rem 3.1rem;
    color: #bbb;
    animation: fade-in 0.3s ease-out;
}

[dir="rtl"] .faq-item p {
    padding: 0 3.1rem 1rem 0.2rem;
}

/* ---------- Info pages on smaller screens ---------- */
@media (max-width: 1000px) {
    .legal-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .legal-toc {
        position: static;
    }

    .legal-toc ol {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .info-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .channel-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-story {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-story-image {
        order: -1;
    }
}

@media (max-width: 600px) {
    .info-hero {
        padding: 2.6rem 1rem 1.6rem;
        border-radius: 18px;
    }

    .info-hero-icon {
        width: 66px;
        height: 66px;
        border-radius: 20px;
    }

    .info-hero-icon .icon {
        width: 34px;
        height: 34px;
    }

    .feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .legal-card {
        padding: 1.1rem;
    }

    .legal-card-head {
        gap: 0.7rem;
    }

    .legal-card-icon {
        width: 40px;
        height: 40px;
    }

    .legal-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .legal-toc details:not([open]) ol {
        display: none;
    }

    .mission-card {
        flex-direction: column;
    }

    .faq-item p {
        padding-inline-start: 0.2rem;
    }

    [dir="rtl"] .faq-item p {
        padding: 0 0.2rem 1rem;
    }
}

@media (max-width: 380px) {
    .info-highlights {
        grid-template-columns: minmax(0, 1fr);
    }
}

html[lang="ar"] .info-title {
    line-height: 1.5;
}
html { scroll-behavior: smooth; }
