/* ==========================================
   LENNY'S MIXTAPE - CASSETTE AESTHETIC
   ========================================== */

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

body {
    background-color: var(--color-background);
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(122, 157, 176, 0.03) 2px, rgba(122, 157, 176, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(122, 157, 176, 0.03) 2px, rgba(122, 157, 176, 0.03) 4px);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   CASSETTE HEADER
   ========================================== */

.cassette-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    padding: clamp(2rem, 5vw, 3rem) 1rem;
}

.cassette {
    width: 100%;
    max-width: min(550px, 90vw);
    aspect-ratio: 550 / 360;
    border-radius: 9px;
    background: #8caec0;
    border: 1px solid #0a0a0a;
    position: relative;
    box-shadow:
        1px 3px 3px hsla(0, 0%, 36%, 0.1),
        1px 12px 4px hsla(0, 0%, 86%, 0.1),
        15px 15px 15px hsla(0, 0%, 46%, 0.1);
}

.cassette-label-area {
    position: absolute;
    top: 10%;
    left: 50%;
    width: calc(100% - 18%);
    height: 18%;
    transform: translateX(-50%);
    background: #f1efed;
    border: 2px solid #2e2f34;
    border-radius: 3px;
    z-index: 100;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.label-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        transparent,
        transparent 22%,
        #2e2f34 22%,
        #2e2f34 23%,
        transparent 23%,
        transparent 50%,
        #2e2f34 50%,
        #2e2f34 51%,
        transparent 51%,
        transparent 78%,
        #2e2f34 78%,
        #2e2f34 79%
    );
    opacity: 0.4;
}

.cassette #mix {
    position: relative;
    font-family: 'Schoolbell', cursive;
    /* font-family:  var(--font-body); */
    font-weight: 400;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    line-height: 1;
    text-align: center;
    color: #2e2f34;
    z-index: 101;
    padding: 0;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

.produced-by {
    position: absolute;
    bottom: 28%;
    right: 8%;
    font-family: var(--font-body);
    font-size: clamp(0.5rem, 1.2vw, 0.7rem);
    color: rgba(187, 187, 187, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 50;
}

.cassette .label {
    width: calc(100% - 11%);
    height: 64%;
    position: relative;
    margin: 5.5%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 9px 9px 0 0;
    border: 1px solid #0a0a0a;
    outline: 1px solid transparent;
    background: linear-gradient(
        var(--color-primary) 46%,
        #2e2f34 46%,
        #2e2f34 calc(46% + 1px),
        #cac86b calc(46% + 2px),
        #cac86b calc(46% + 7px),
        #2e2f34 calc(46% + 7px),
        #2e2f34 calc(46% + 10px),
        #7bb641 calc(46% + 10px),
        #7bb641 calc(46% + 15px),
        #2e2f34 calc(46% + 15px),
        #2e2f34 calc(46% + 20px),
        #3babc7 calc(46% + 20px),
        #3babc7 calc(46% + 24px),
        #2e2f34 calc(46% + 24px),
        #2e2f34 calc(46% + 31px),
        #2f37cf calc(46% + 31px),
        #2f37cf calc(46% + 33px),
        #2e2f34 calc(46% + 33px)
    );
}

.cassette .label .reels {
    position: relative;
    margin-top: 8%;
    border-radius: 50px;
    background: #fcfcfc;
    border: 1px solid #0a0a0a;
    z-index: 99;
    align-items: center;
    justify-content: center;
    gap: 6%;
    padding: 4% 5%;
    display: grid;
    grid-template-columns: auto auto auto;
}

.cassette .label .reels .reelHole {
    width: clamp(40px, 11vw, 60px);
    height: clamp(40px, 11vw, 60px);
    border: clamp(2px, 0.5vw, 3px) solid #676767;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 clamp(2px, 0.5vw, 3px) #e6e6e6;
    background: #fcfcfc;
}

.cassette .label .reels .reelHole span {
    display: block;
    position: absolute;
    top: calc(50% - 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 5px;
    border: solid #676767;
    border-width: 0 6px;
}

.cassette .label .reels .reelHole span:nth-of-type(2) {
    transform: translateX(-50%) rotate(60deg);
}

.cassette .label .reels .reelHole span:nth-of-type(3) {
    transform: translateX(-50%) rotate(-60deg);
}

.cassette .label .reels .window {
    background: #e6e6e6;
    width: clamp(80px, 22vw, 120px);
    height: clamp(40px, 11vw, 60px);
    border: clamp(1px, 0.4vw, 2px) solid #676767;
    overflow: hidden;
    position: relative;
}

.cassette .label .reels .window::after {
    display: block;
    position: absolute;
    background: linear-gradient(
        transparent 0,
        transparent 3%,
        rgba(255, 255, 255, 0.1) 9%,
        rgba(255, 255, 255, 0.1) 13%,
        transparent 15%,
        rgba(255, 255, 255, 0.1) 18%,
        rgba(255, 255, 255, 0.1) 34%,
        transparent 34%,
        transparent 34%,
        rgba(255, 255, 255, 0.1) 44%,
        rgba(255, 255, 255, 0.1) 70%,
        transparent 90%
    );
    content: "";
    width: 100%;
    height: 100%;
}

.cassette .label .reels .window .spool {
    position: absolute;
    top: -30%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: block;
}

.cassette .label .reels .window .spool:first-of-type {
    left: -70%;
    box-shadow: 0 0 0 70px #676767, 0 0 0 72px #676767;
}

.cassette .label .reels .window .spool:last-of-type {
    right: -80%;
    box-shadow: 0 0 0 7px #676767, 0 0 0 9px #676767;
}

.cassette .head {
    width: 60%;
    height: 23%;
    position: absolute;
    margin-left: 20%;
    bottom: -3px;
}

.cassette .head::before,
.cassette .head::after {
    display: block;
    content: "";
    width: 70%;
    height: 100%;
    position: absolute;
    background: #8caec0;
    border: 1px solid #0a0a0a;
}

.cassette .head::before {
    transform: skew(-15deg);
    left: -8%;
    border-right: none;
    border-radius: 9px 0 0 9px;
}

.cassette .head::after {
    transform: skew(15deg);
    right: -8%;
    border-left: none;
    border-radius: 0 9px 9px 0;
}

.cassette .screw {
    position: absolute;
    width: 10px;
    height: 10px;
}

.cassette .screw::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    left: 0;
    border-radius: 5px;
    background: #676767;
    background: linear-gradient(to bottom, #515151 1%, #342c32 100%);
    box-shadow: 0 1px 1px 0 rgba(181, 181, 181, 0.8);
}

.cassette .screw:nth-child(1) {
    top: 6px;
    left: 6px;
}

.cassette .screw:nth-child(2) {
    top: 6px;
    right: 6px;
}

.cassette .screw:nth-child(3) {
    bottom: 6px;
    right: 6px;
}

.cassette .screw:nth-child(4) {
    bottom: 6px;
    left: 6px;
}

.cassette .hole {
    width: 16px;
    height: 16px;
    position: absolute;
    border-radius: 50%;
    border: 1px solid #0a0a0a;
    z-index: 3;
}

.cassette .hole:nth-child(1) {
    bottom: 12px;
    left: 10%;
}

.cassette .hole:nth-child(2) {
    bottom: 24px;
    left: 30%;
}

.cassette .hole:nth-child(3) {
    bottom: 24px;
    right: 30%;
}

.cassette .hole:nth-child(4) {
    bottom: 12px;
    right: 10%;
}

/* ==========================================
   MESSAGE SECTION
   ========================================== */

.message-section {
    margin-bottom: clamp(2rem, 5vw, 3rem);
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.message-card {
    background: var(--color-card-bg);
    border-radius: 12px;
    padding: 2rem;
    max-width: min(650px, 90vw);
    width: 100%;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.07),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--color-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 8px rgba(0, 0, 0, 0.08),
        0 15px 30px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.heart-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.message-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-secondary);
}

.message-content {
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-line;
    color: var(--color-text);
    opacity: 0.9;
}

/* ==========================================
   TRACKS SECTION - Cassette Case Insert
   ========================================== */

.tracks-section {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.cassetteCase {
    position: relative;
    width: 100%;
    max-width: min(650px, 90vw);
    outline: 3px solid var(--color-card-bg);
    outline-offset: -4px;
    border: 1px solid #e6e6e6;
    box-shadow:
        1px 3px 3px hsla(0, 0%, 36%, 0.1),
        1px 12px 4px hsla(0, 0%, 86%, 0.1),
        15px 15px 15px hsla(0, 0%, 46%, 0.1);
    background-image: repeating-linear-gradient(
        var(--color-card-bg) 0,
        var(--color-card-bg) clamp(25px, 5vw, 30px),
        #e6e6e6 clamp(25px, 5vw, 30px),
        var(--color-card-bg) calc(clamp(25px, 5vw, 30px) + 1px),
        var(--color-card-bg) clamp(30px, 6vw, 40px)
    );
    line-height: clamp(30px, 6vw, 40px);
    padding: clamp(15px, 3vw, 20px) clamp(18px, 4vw, 24px);
    z-index: 1;
}

.cassetteCase::after {
    content: "";
    width: 100%;
    height: 46px;
    background: var(--color-card-bg);
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    border-bottom: 3px solid var(--color-text);
    z-index: -1;
}

.cassetteCase .side-title {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.cassetteCase .side {
    background: var(--color-text);
    font-family: var(--font-body);
    color: var(--color-card-bg);
    font-size: 1rem;
    line-height: 1;
    padding: 2px 7px 4px;
    display: inline-block;
    vertical-align: baseline;
}

.cassetteCase .side-header {
    font-family: 'Schoolbell', cursive;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    line-height: 1;
    margin: 0;
    display: inline-block;
    margin-left: clamp(8px, 2vw, 12px);
    vertical-align: baseline;
}

.cassetteCase .track-list {
    font-family: 'Schoolbell', cursive;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: clamp(30px, 6vw, 40px);
    padding-top: clamp(15px, 3vw, 20px);
}

.cassetteCase .track-item {
    margin: 0;
    padding: 0;
}

.favourite-heart {
    color: var(--color-primary);
    margin-left: 0.5em;
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}

.favourite-heart svg {
    width: 100%;
    height: 100%;
    filter:
        drop-shadow(0 1px 1px rgba(232, 130, 78, 0.2))
        url(#roughen);
}

/* Random tilts for hand-drawn effect */
.track-item:nth-child(1) .favourite-heart {
    transform: rotate(-5deg);
}

.track-item:nth-child(2) .favourite-heart {
    transform: rotate(7deg);
}

.track-item:nth-child(3) .favourite-heart {
    transform: rotate(-3deg);
}

.track-item:nth-child(4) .favourite-heart {
    transform: rotate(4deg);
}

.track-item:nth-child(5) .favourite-heart {
    transform: rotate(-6deg);
}

.track-item:nth-child(6) .favourite-heart {
    transform: rotate(8deg);
}

.track-item:nth-child(7) .favourite-heart {
    transform: rotate(-4deg);
}

.track-item:nth-child(8) .favourite-heart {
    transform: rotate(5deg);
}

.track-item:nth-child(9) .favourite-heart {
    transform: rotate(-7deg);
}

.track-item:nth-child(10) .favourite-heart {
    transform: rotate(3deg);
}

.track-item:nth-child(11) .favourite-heart {
    transform: rotate(-8deg);
}

.track-item:nth-child(12) .favourite-heart {
    transform: rotate(6deg);
}

/* Additional rotations for Side B tracks */
.track-item:nth-child(13) .favourite-heart {
    transform: rotate(-4deg);
}

.track-item:nth-child(14) .favourite-heart {
    transform: rotate(7deg);
}

.track-item:nth-child(15) .favourite-heart {
    transform: rotate(-5deg);
}

.track-item:nth-child(16) .favourite-heart {
    transform: rotate(4deg);
}

.track-item:nth-child(17) .favourite-heart {
    transform: rotate(-6deg);
}

.track-item:nth-child(18) .favourite-heart {
    transform: rotate(5deg);
}

.track-item:nth-child(19) .favourite-heart {
    transform: rotate(-3deg);
}

.track-item:nth-child(20) .favourite-heart {
    transform: rotate(8deg);
}

/* Add sketchy stroke effect using SVG filters */
.favourite-heart svg path {
    stroke-dasharray: 1, 1;
    stroke-dashoffset: 0;
    paint-order: stroke;
    animation: heartDraw 3s ease-in-out infinite;
}

@keyframes heartDraw {
    0%, 100% {
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dashoffset: 0.5;
    }
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    border-radius: 2px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.track-card {
    background: var(--color-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.track-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

.album-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.album-art {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    background: var(--color-secondary);
}

.album-art img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.album-link:hover .album-art img {
    transform: scale(1.08);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(2px);
}

.album-link:hover .play-overlay {
    opacity: 1;
}

.play-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(232, 130, 78, 0.2) 0%, transparent 70%);
}

.play-icon {
    width: 60px;
    height: 60px;
    color: white;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.album-link:hover .play-icon {
    transform: scale(1.1);
}

.track-info {
    padding: 1rem;
}

.track-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.track-artist {
    font-size: 0.95rem;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
}

.track-note {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.track-note p {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--color-text);
    opacity: 0.8;
}

/* ==========================================
   SPOTIFY LINK
   ========================================== */

.spotify-link-section {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.spotify-link-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--color-card-bg);
    border-radius: 12px;
    border-left: 5px solid var(--color-primary);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.07),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--color-text);
    max-width: 500px;
}

.spotify-link-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 8px rgba(0, 0, 0, 0.08),
        0 15px 30px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

.spotify-link-card:hover .mini-cassette-body {
    transform: scale(1.05);
}

.spotify-link-card:hover .spotify-arrow {
    transform: translateX(5px);
}

.mini-cassette {
    flex-shrink: 0;
}

.mini-cassette-body {
    width: 60px;
    height: 40px;
    background: #8caec0;
    border-radius: 4px;
    border: 1px solid #0a0a0a;
    position: relative;
    transition: transform 0.3s ease;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.mini-label {
    width: 85%;
    height: 60%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-primary);
    border-radius: 3px;
    border: 1px solid #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-reels {
    display: flex;
    gap: 12px;
}

.mini-reel {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #0a0a0a;
    background: #fcfcfc;
}

.spotify-link-text {
    flex: 1;
}

.spotify-link-main {
    font-family: 'Schoolbell', cursive;
    font-size: 1.3rem;
    margin: 0;
    color: var(--color-secondary);
    line-height: 1.2;
}

.spotify-link-sub {
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin: 0;
    color: var(--color-text);
    opacity: 0.7;
}

.spotify-arrow {
    flex-shrink: 0;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--color-secondary);
    font-family: var(--font-heading);
}

.heart {
    color: var(--color-primary);
    font-size: 1.2em;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .mixtape-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .message-card {
        padding: 1.5rem;
    }

    .cassette-body {
        width: 450px;
        padding: 1.5rem;
    }

    .reel {
        width: 60px;
        height: 60px;
    }

    .tape-window {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mixtape-title {
        font-size: 1.25rem;
        letter-spacing: 1px;
    }

    .cassette-body {
        width: 340px;
        padding: 1.25rem;
    }

    .reel {
        width: 50px;
        height: 50px;
    }

    .reel-center {
        width: 18px;
        height: 18px;
    }

    .reel-center::before {
        width: 6px;
        height: 6px;
    }

    .tape-window {
        padding: 1rem;
    }

    .screw {
        width: 10px;
        height: 10px;
    }

    .screw::after {
        width: 6px;
    }

    .cassette-label {
        padding: 1rem 0.75rem;
    }

    .message-card {
        padding: 1.25rem;
    }

    .cassette-header {
        padding: 2rem 0;
    }
}
