* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --card-border-color: #d4c5a9;
    /* Vintage cardboard/paper feel */
    --card-bg: #fdfbf7;
    --card-accent: #1a1a1a;
    --card-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15);
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    background-color: #ffffff;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    font-family: 'Courier New', monospace;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 10px; /* Moved higher up */
}

/* --- High Fidelity Retro Sports Card Style --- */
.sports-card {
    /* Base Color: Off-white/aged paper */
    background-color: #f4e4bc;

    /* Complex Gradient + Noise Pattern to simulate cardboard stock */
    background-image:
        /* Subtle vignette */
        radial-gradient(circle at center, transparent 50%, rgba(0, 0, 0, 0.03) 100%),
        /* Fiber/Grain effect */
        repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.02) 0px, rgba(0, 0, 0, 0.02) 1px, transparent 1px, transparent 4px),
        repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.02) 0px, rgba(0, 0, 0, 0.02) 1px, transparent 1px, transparent 4px);

    /* Physical border: Thick card stock "frame" */
    border: 12px solid #fff;

    /* Double layering of shadows to create "thickness" */
    box-shadow:
        /* Inner shadow simulating the paper being slightly pressed */
        inset 0 0 20px rgba(0, 0, 0, 0.05),
        /* The edge of the card stock */
        0 0 0 1px #d0d0d0,
        /* Lift shadow */
        5px 8px 20px rgba(0, 0, 0, 0.25),
        1px 3px 5px rgba(0, 0, 0, 0.1);

    border-radius: 4px;
    /* Slightly worn corners */
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;

    /* Texture blending */
    background-blend-mode: multiply;
}

/* SVG Noise Overlay for fine grain */
.sports-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

/* Image Slot */
.card-image-slot {
    width: 100%;
    aspect-ratio: 4/3;
    background: #e8e8e8;
    margin-bottom: 0px;
    /* Flush with content */
    border: 2px solid #333;
    /* Ink border */
    position: relative;
    overflow: hidden;
    z-index: 2;
    /* Filter to slightly desaturate/age content inside */
    filter: sepia(0.2) contrast(1.1);
}

.card-image-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image-slot:empty {
    background-image:
        repeating-linear-gradient(45deg, #ccc 0, #ccc 1px, transparent 1px, transparent 10px),
        linear-gradient(to bottom, #ddd, #eee);
    opacity: 0.5;
}

/* Typography styles inside card */
.card-title,
.banner-title {
    font-family: 'Impact', sans-serif;
    text-transform: uppercase;
    color: #2a2a2a;
    letter-spacing: 1px;
    /* Ink bleed effect */
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

.card-description-overlay {
    background: #fff;
    /* Clean paper for text area */
    border-top: 2px solid #333;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    background-blend-mode: overlay;
    background-color: #fdfdfd;
}

.card-stats-area {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #444;
    border-top: 1px dashed #999;
}


/* Shared Styles */
.content-container {
    text-align: center;
    z-index: 1;
    padding: 0 20px;
    max-width: 800px;
}

.main-title {
    font-size: 3rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 24px;
    pointer-events: none;
}

.arrow-toggle {
    margin: 0 auto 10px auto;
    cursor: pointer;
    transition: transform 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.arrow-toggle:hover {
    transform: scale(1.2);
    color: #000;
}

.arrow-toggle.expanded {
    transform: rotate(180deg);
}

.subtitle-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
    position: relative;
    z-index: 5;
}

.subtitle-container.expanded {
    max-height: 500px;
    opacity: 1;
    margin-bottom: 24px;
    transition: max-height 3.0s ease, opacity 3.0s ease, margin 3.0s ease;
}

.subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    pointer-events: none;
}

.nav-buttons-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.ball {
    position: fixed;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border: 2px solid black;
    background-color: white;
    border-radius: 50%;
    will-change: transform;
    cursor: pointer;
    overflow: hidden;
    z-index: 2;
}

.ball.orange {
    background-color: #FF5722 !important;
    border-color: #E64A19;
}

.line {
    position: absolute;
    background-color: black;
}

.horizontal {
    width: 100%;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.vertical {
    height: 100%;
    width: 2px;
    left: 50%;
    transform: translateX(-50%);
}

.curve-left {
    width: 70%;
    height: 100%;
    border: 2px solid black;
    border-radius: 50%;
    top: 0;
    left: -35%;
    background: transparent;
}

.curve-right {
    width: 70%;
    height: 100%;
    border: 2px solid black;
    border-radius: 50%;
    top: 0;
    right: -35%;
    background: transparent;
}

.nav-btn {
    background-color: black;
    color: white;
    padding: 18px 42px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.75rem;
    border-radius: 6px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 10;
    pointer-events: auto;
    position: relative;
    white-space: nowrap;
    min-width: 320px;
    text-align: center;
    display: inline-block;
}

.nav-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* --- Basketball Hoops --- */
.hoop-container {
    position: fixed;
    top: 35%;
    z-index: 9999;
    /* Force on top of everything */
    width: 140px;
    height: 140px;
    pointer-events: none;
    /* Let clicks pass through */
    animation: hoop-float 6s ease-in-out infinite;
}

.left-hoop {
    left: 0px;
    /* Force onto screen edge */
    transform: rotate(15deg);
    /* Slight angle inwards */
}

.right-hoop {
    right: 0px;
    /* Force onto screen edge */
    transform: rotate(-15deg) scaleX(-1);
    /* Mirror and tilt */
}

.backboard {
    width: 120px;
    height: 90px;
    border: 3px solid black;
    background-color: white;
    position: relative;
    /* Glass feel */
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.inner-square {
    width: 40px;
    height: 30px;
    border: 2px solid black;
    position: absolute;
    bottom: 15px;
    /* Just above rim */
    left: 50%;
    transform: translateX(-50%);
}

.rim-connect {
    width: 10px;
    height: 10px;
    background: black;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
}

.rim {
    width: 60px;
    height: 12px;
    border: 3px solid black;
    border-radius: 50%;
    /* Oval */
    position: absolute;
    bottom: 5px;
    /* Protrudes slightly below backboard bottom physically, but visually attached */
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    /* See through */
    z-index: 2;
}

/* Net Logic */
.net {
    width: 46px;
    height: 50px;
    position: absolute;
    top: 50%;
    /* Starts at middle of rim */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    /* Behind rim front */

    /* Cross hatch pattern for net */
    background:
        repeating-linear-gradient(60deg, transparent, transparent 4px, black 4px, black 5px),
        repeating-linear-gradient(-60deg, transparent, transparent 4px, black 4px, black 5px);

    /* Shape the net: wider at top, narrow at bottom */
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);

    /* Animation */
    transform-origin: top center;
    animation: net-sway 4s ease-in-out infinite alternate;
}


/* Animations */
@keyframes hoop-float {

    0%,
    100% {
        transform: translateY(0) rotate(15deg);
    }

    50% {
        transform: translateY(-15px) rotate(15deg);
    }
}

/* Specific float for right hoop to preserve scaleX(-1) */
.right-hoop {
    animation-name: hoop-float-right;
}

@keyframes hoop-float-right {

    0%,
    100% {
        transform: translateY(0) rotate(-15deg) scaleX(-1);
    }

    50% {
        transform: translateY(-15px) rotate(-15deg) scaleX(-1);
    }
}


@keyframes net-sway {
    0% {
        transform: translateX(-50%) rotate(2deg) skewX(2deg);
    }

    100% {
        transform: translateX(-50%) rotate(-2deg) skewX(-2deg);
    }
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem !important;
    }
    .subtitle {
        font-size: 0.85rem !important;
    }
    .nav-buttons-column {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .nav-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100%;
    }
    .nav-btn {
        width: 100% !important;
        max-width: none !important;
    }
    .ball {
        width: 60px !important;
        height: 60px !important;
    }
    .left-hoop, .right-hoop {
        display: none !important;
    }
    .content-container {
        padding: 0 10px !important;
    }
}