/* 
 * REBEL RADIO - Centralized Styles
 */

/* --- FONTS --- */
@font-face {
    font-family: 'Mustasurma';
    src: url('Mustasurma.ttf') format('truetype');
}
@font-face {
    font-family: 'Funkrocker';
    src: url('Funkrocker.otf') format('opentype');
}

/* --- VARIABLES --- */
:root {
    --punk-green: #1e9e1e;
    --punk-pink: #f500f5;
    --punk-blue: #0000ff;
    --punk-yellow: #ffff00;
    --punk-purple: #a000a0;
    --background: #000000;
}

/* --- BASE --- */
body {
    background-color: var(--background);
    color: white;
    font-family: 'Roboto', 'Work Sans', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: max(884px, 100dvh);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- TEXT UTILITIES --- */
.stencil-text {
    -webkit-text-stroke: 1.5px currentColor;
    paint-order: stroke fill;
    letter-spacing: -0.05em;
}

.stamped-text {
    filter: drop-shadow(1px 1px 0px rgba(0,0,0,0.5));
    letter-spacing: -0.05em;
}

.graffiti-text {
    text-shadow: 2px 2px 0px #0000FF, -1px -1px 0px #FFFF00;
}

/* --- LAYOUT COMPONENTS --- */
header.fixed-top {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: black;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-sizing: border-box;
    z-index: 100;
}

/* --- GRAIN & TEXTURE OVERLAYS --- */
.grain, .grain-texture, .grain-overlay, .photocopy-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    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)'/%3E%3C/svg%3E");
}

.grain, .photocopy-grain { opacity: 0.12; }
.grain-texture { opacity: 0.18; }
.grain-overlay { opacity: 0.12; }

/* --- BACKGROUND TEXTURES --- */
.pasted-wall {
    background-color: #050505;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.2'/%3E%3C/svg%3E");
}

.wall-texture {
    background-color: #050505;
    background-image: radial-gradient(circle at 2px 2px, #1a1a1a 1px, transparent 0);
    background-size: 24px 24px;
}

.alley-texture {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='roughness'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.05' numOctaves='2'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='10'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='%230a0a0a'/%3E%3C/svg%3E");
}

.distressed-bg {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.2'/%3E%3C/svg%3E");
}

/* --- CLIPPING & EDGE EFFECTS --- */
.rough-edge, .ripped-edge {
    clip-path: polygon(
        0% 2%, 5% 0%, 10% 3%, 15% 1%, 20% 4%, 25% 2%, 30% 5%, 35% 1%, 40% 4%, 45% 2%, 50% 5%, 55% 1%, 60% 4%, 65% 2%, 70% 5%, 75% 1%, 80% 4%, 85% 2%, 90% 5%, 95% 1%, 100% 3%, 
        98% 10%, 100% 20%, 97% 30%, 100% 40%, 98% 50%, 100% 60%, 97% 70%, 100% 80%, 98% 90%, 100% 100%,
        95% 97%, 90% 100%, 85% 98%, 80% 100%, 75% 97%, 70% 100%, 65% 98%, 60% 100%, 55% 97%, 50% 100%, 45% 98%, 40% 100%, 35% 97%, 30% 100%, 25% 98%, 20% 100%, 15% 97%, 10% 100%, 5% 98%, 0% 100%,
        2% 90%, 0% 80%, 3% 70%, 1% 60%, 4% 50%, 2% 40%, 5% 30%, 1% 20%, 3% 10%
    );
}

.xerox-frame {
    clip-path: polygon(
        0% 2%, 5% 0%, 15% 2%, 25% 1%, 35% 3%, 45% 0%, 55% 2%, 65% 1%, 75% 4%, 85% 0%, 95% 3%, 100% 1%,
        100% 98%, 95% 100%, 85% 97%, 75% 99%, 65% 98%, 55% 100%, 45% 97%, 35% 99%, 25% 98%, 15% 100%, 5% 98%, 0% 100%
    );
}

.torn-paper {
    clip-path: polygon(
        0 0, 5% 2%, 10% 0, 15% 3%, 20% 0, 25% 4%, 30% 0, 35% 2%, 40% 0, 45% 5%, 50% 0, 55% 3%, 60% 0, 65% 4%, 70% 0, 75% 2%, 80% 0, 85% 6%, 90% 0, 95% 3%, 100% 0,
        98% 5%, 100% 10%, 97% 15%, 100% 20%, 99% 25%, 100% 30%, 98% 35%, 100% 40%, 97% 45%, 100% 50%, 99% 55%, 100% 60%, 98% 65%, 100% 70%, 97% 75%, 100% 80%, 99% 85%, 100% 90%, 98% 95%, 100% 100%,
        95% 98%, 90% 100%, 85% 97%, 80% 100%, 75% 99%, 70% 100%, 65% 98%, 60% 100%, 55% 97%, 50% 100%, 45% 99%, 40% 100%, 35% 98%, 30% 100%, 25% 97%, 20% 100%, 15% 99%, 10% 100%, 5% 98%, 0 100%,
        2% 95%, 0 90%, 3% 85%, 0 80%, 1% 75%, 0 70%, 2% 65%, 0 60%, 3% 55%, 0 50%, 1% 45%, 0 40%, 2% 35%, 0 30%, 3% 25%, 0 20%, 1% 15%, 0 10%, 2% 5%
    );
}

.torn-edge {
    clip-path: polygon(0% 0%, 5% 2%, 10% 0%, 15% 3%, 20% 0%, 25% 2%, 30% 0%, 35% 3%, 40% 0%, 45% 2%, 50% 0%, 55% 3%, 60% 0%, 65% 2%, 70% 0%, 75% 3%, 80% 0%, 85% 2%, 90% 0%, 95% 3%, 100% 0%, 100% 100%, 95% 98%, 90% 100%, 85% 97%, 80% 100%, 75% 98%, 70% 100%, 65% 97%, 60% 100%, 55% 98%, 50% 100%, 45% 97%, 40% 100%, 35% 98%, 30% 100%, 25% 97%, 20% 100%, 15% 98%, 10% 100%, 5% 97%, 0% 100%);
}

.torn-edge-rough {
    clip-path: polygon(2% 0%, 5% 5%, 12% 1%, 18% 7%, 25% 2%, 32% 6%, 40% 1%, 48% 8%, 55% 3%, 62% 7%, 70% 2%, 78% 6%, 85% 1%, 92% 5%, 98% 0%, 100% 4%, 96% 15%, 100% 25%, 94% 35%, 100% 45%, 96% 55%, 100% 65%, 95% 75%, 100% 85%, 97% 95%, 100% 100%, 95% 96%, 88% 100%, 82% 94%, 75% 100%, 68% 95%, 60% 100%, 52% 93%, 45% 100%, 38% 94%, 30% 100%, 22% 95%, 15% 100%, 8% 94%, 0% 100%, 3% 92%, 0% 85%, 5% 75%, 0% 65%, 4% 55%, 0% 45%, 6% 35%, 0% 25%, 3% 15%, 0% 5%);
}

.torn-edge-b {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 95% 95%, 88% 90%, 80% 96%, 72% 91%, 65% 97%, 55% 92%, 45% 98%, 35% 91%, 25% 96%, 15% 90%, 8% 97%, 0 92%);
}

/* --- POLAROID & MEDIA --- */
.polaroid-frame {
    background-color: #fff;
    background-image: url('https://www.transparenttextures.com/patterns/cardboard.png');
    padding: 1rem;
    padding-bottom: 3.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid #ddd;
}

.polaroid-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
}

.tape-effect {
    background: rgba(234, 234, 0, 0.7);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
    transform: rotate(-15deg);
}

.staple {
    width: 14px;
    height: 3px;
    background: #444;
    position: absolute;
    box-shadow: 1px 1px 0px rgba(0,0,0,0.5);
}

.xerox-distress {
    filter: contrast(1.6) brightness(0.85) grayscale(1);
}

/* --- SPECIAL COMPONENTS --- */

/* TV Component (Index) */
.tv-frame {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1.15;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.tv-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('tv.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 2;
}

.tv-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 67%;
    height: 72.5%;
    background: #000;
    overflow: hidden;
    border-radius: 5px;
    z-index: 1;
}

.tv-screen::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 2;
}

.static-noise {
    width: 100%;
    height: 100%;
    opacity: 0.9;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: static-anim 0.2s steps(2) infinite;
}

@keyframes static-anim {
    0% { transform: translate(0,0); }
    50% { transform: translate(-2%, -2%); }
    100% { transform: translate(2%, 2%); }
}

/* Lyrics Scroll (Index) */
.lyrics-scroll {
    position: absolute;
    top: -10%;
    left: -50%;
    width: 200%;
    height: 200%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

.lyrics-line {
    font-family: 'Mustasurma', sans-serif;
    font-size: 100px;
    white-space: nowrap;
    color: var(--punk-pink);
    -webkit-text-stroke: 2px var(--punk-yellow);
    text-transform: uppercase;
    animation: scroll-left 60s linear infinite;
}

.lyrics-line:nth-child(even) {
    animation-direction: reverse;
    animation-duration: 80s;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Play Button */
.play-btn-overlay {
    position: absolute;
    top: 34%;
    left: 66%;
    transform: translate(-50%, -50%) rotate(12deg);
    z-index: 20;
}

.play-btn {
    background-color: var(--punk-yellow);
    color: black;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 15px 15px 0px rgba(0,0,0,0.4);
    border: none;
}

.play-btn:hover { transform: scale(1.1); }
.play-btn span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 900;
    font-size: 48px;
    letter-spacing: -2px;
}

/* Marquee */
.marquee-container {
    background-color: var(--punk-blue);
    color: var(--punk-yellow);
    padding: 12px 0;
    border-top: 2px solid black;
    border-bottom: 2px solid black;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 900;
    font-size: 24px;
    text-transform: uppercase;
    animation: marquee-anim 15s linear infinite;
}

@keyframes marquee-anim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- UI ELEMENTS --- */

/* FAB */
.fab {
    position: fixed;
    bottom: 112px;
    right: 24px;
    z-index: 60;
    background-color: white;
    border-radius: 50%;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fab:active { transform: scale(0.9); }
.fab .material-symbols-outlined { color: black; font-size: 36px; }

/* Cards (Index) */
.card-white { background-color: white; color: black; }
.card-yellow { background-color: var(--punk-yellow); color: black; }
.card-white .material-symbols-outlined { color: #0000ff; }

.rot-left { transform: rotate(-3deg); }
.rot-right { transform: rotate(2deg); }
.rot-small-left { transform: rotate(-1deg); }
.rot-small-right { transform: rotate(3deg); }

/* News Content */
.paper-scrap {
    background: white;
    color: black;
    padding: 10px 20px;
    transform: rotate(-2deg);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.3);
    display: inline-block;
}

.news-img-box {
    background-color: #333;
    padding: 8px;
    border: 4px solid var(--punk-yellow);
    width: 256px;
    height: 256px;
    box-shadow: 20px 20px 0px rgba(0,0,0,0.4);
}

.news-img-box.alt {
    border-color: var(--punk-blue);
}

.news-content {
    background-color: white;
    color: black;
    padding: 16px;
    max-width: 300px;
    position: relative;
    z-index: 10;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.3);
}

.news-content.yellow {
    background-color: var(--punk-yellow);
    max-width: none;
    width: 100%;
}

.time-tag {
    background-color: var(--punk-blue);
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: bold;
}

/* Underground/Freq specific */
.paper-blue {
    background-color: #0000FF;
    color: white;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.4);
}

.paper-yellow {
    background-color: #FFFF00;
    color: black;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.4);
}

.spray-shadow {
    filter: drop-shadow(0px 0px 8px rgba(255, 255, 0, 0.6));
}
