/* BASE STYLES & RESETS */
:root {
    --paper-bg: #d4c5a9;
    --paper-dark: #b8a07e;
    --ink-black: #1a1612;
    --blood-red: #8a1c1c;
    --dirty-gold: #c2b292;
}

body {
    background-color: #0d0a08;
    color: var(--paper-bg);
    font-family: 'Special Elite', monospace;
    overflow-x: hidden;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238a1c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'></circle><line x1='12' y1='8' x2='12' y2='16'></line><line x1='8' y1='12' x2='16' y2='12'></line></svg>") 12 12, auto;
}

/* TYPOGRAPHY */
.font-creepster { font-family: 'Creepster', cursive; }
.font-rye { font-family: 'Rye', serif; }
.font-special { font-family: 'Special Elite', monospace; }
.font-typewriter { font-family: 'Special Elite', monospace; }
.font-handwriting { font-family: 'IM Fell English SC', serif; font-style: italic; }

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

.scratch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='scratches' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cpath d='M10,10 l2,2 M50,30 l-2,4 M80,80 l5,-5' stroke='%23000' stroke-width='0.5' opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23scratches)'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0px 0px 150px rgba(0,0,0,0.9);
    pointer-events: none;
    z-index: 9997;
}

/* EFFECTS & FILTERS */
.sepia-filter {
    filter: sepia(0.8) contrast(1.2) brightness(0.9) grayscale(0.2);
    transition: filter 0.5s ease;
}

.sepia-filter:hover {
    filter: sepia(0) contrast(1) brightness(1) grayscale(0);
}

.text-shadow-dirty {
    text-shadow: 2px 2px 0px #000, 4px 4px 0px rgba(138, 28, 28, 0.5);
}

.text-shadow-white {
    text-shadow: 2px 2px 0px #d4c5a9;
}

.paper-texture {
    background-image: radial-gradient(#d4c5a9, #c2b292);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ANIMATIONS */
@keyframes flicker {
    0% { opacity: 1; transform: skewX(0deg); }
    5% { opacity: 0.8; transform: skewX(2deg); }
    10% { opacity: 1; transform: skewX(0deg); }
    15% { opacity: 1; transform: skewX(0deg); }
    20% { opacity: 0.5; transform: skewX(-2deg); }
    25% { opacity: 1; transform: skewX(0deg); }
    100% { opacity: 1; transform: skewX(0deg); }
}

.flicker-text {
    animation: flicker 4s infinite random;
}

@keyframes breathe {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.coin-spin {
    animation: breathe 4s ease-in-out infinite;
}
.coin-spin:hover {
    animation: spin-slow 10s linear infinite;
}

/* COMPONENTS */
.btn-vintage {
    background-color: var(--blood-red);
    color: var(--paper-bg);
    font-family: 'Rye', serif;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    border: 2px solid #000;
    box-shadow: 4px 4px 0px #000;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-vintage:hover {
    transform: translate(2px, 2px) rotate(0deg);
    box-shadow: 2px 2px 0px #000;
    background-color: #6d1616;
}

.btn-vintage-secondary {
    background-color: transparent;
    color: var(--paper-bg);
    font-family: 'Rye', serif;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    border: 2px solid var(--paper-bg);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s;
}

.btn-vintage-secondary:hover {
    background-color: var(--paper-bg);
    color: #000;
}

.sticky-tape-top::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 60px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.mask-edges {
    -webkit-mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

.dashed-line {
    background-image: linear-gradient(to bottom, #5c4d3c 50%, transparent 50%);
    background-size: 100% 20px;
    background-repeat: repeat-y;
}

/* Loading State */
body.loading {
    overflow: hidden;
}

body.loading::before {
    content: 'LOADING HYPOCRISY...';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    color: var(--paper-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Creepster', cursive;
    font-size: 2rem;
    z-index: 10000;
    transition: opacity 0.5s;
}

body.loaded::before {
    opacity: 0;
    pointer-events: none;
}
