/* ============================================================================
   LORD HENTAİ — Base Styles & Animations (AkumaBox Standard v9)
   ============================================================================ */

/* ── Document Setup ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-primary);
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text);
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 15% 10%, rgba(255, 51, 102, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 35%, rgba(121, 40, 202, 0.10) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(255, 51, 102, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    color: #fff;
    font-weight: 800;
    line-height: var(--leading-tight);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast) var(--ease-out);
}

/* ── Custom Glass Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.3);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0.6rem 1.3rem;
    font-size: var(--text-sm);
    font-weight: 700;
    font-family: inherit;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all var(--t-base) var(--ease-out);
    white-space: nowrap;
    user-select: none;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gradient-accent);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 2px rgba(0, 0, 0, 0.25), 0 4px 14px rgba(0, 0, 0, 0.45);
}

.btn-primary:hover {
    background: var(--gradient-accent);
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 2px rgba(0, 0, 0, 0.25), 0 6px 20px rgba(0, 0, 0, 0.55);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    border-top-color: rgba(255, 77, 141, 0.35);
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: var(--text-xs);
    border-radius: var(--r-sm);
}

.w-full {
    width: 100%;
}

.text-gold {
    color: #FBBF24 !important;
}

.text-error {
    color: var(--error) !important;
}

/* ── Keyframe Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.04);
    }
}

/* ── Utilities ── */
.line-clamp-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ── English / Latin Minimal Typography ── */
[lang="en"], .en, .hero-original, .card-sub, .card-year, .title-meta-en, .sidebar-row span:last-child {
    font-family: var(--font-sans);
    letter-spacing: -0.2px;
}


/* Global High-Contrast Input Color Fix (Mobile iOS/Android Strict Override) */
input, textarea, select {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    caret-color: #A855F7 !important;
}
input::placeholder, textarea::placeholder {
    color: #94A3B8 !important;
    -webkit-text-fill-color: #94A3B8 !important;
    opacity: 1 !important;
}
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #FFFFFF !important;
    -webkit-box-shadow: 0 0 0px 1000px #1a1428 inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}
