/* Mott Lane - Music Collection Website Clone */

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

:root {
    --bg-color: #000;
    --card-bg: #fff;
    --text-dark: #000;
    --text-light: #fff;
    --text-muted: #666;
    --link-color: #e74c3c;
    --spotify-green: #1DB954;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Logo */
.logo {
    position: fixed;
    top: 20px;
    left: 25px;
    z-index: 1000;
    text-decoration: none;
}

.logo-container {
    position: relative;
    display: inline-block;
}

.logo-tiles {
    display: grid;
    grid-template-columns: repeat(32, 1fr);
    gap: 0;
}

.logo-tile {
    width: 4px;
    height: 4px;
    transition: background-color 0.1s ease;
}

.logo-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 1000;
    letter-spacing: 2px;
    color: #ffffff;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}


/* Top right link */
.top-right-link {
    position: fixed;
    top: 25px;
    right: 30px;
    z-index: 1000;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.top-right-link:hover {
    color: var(--text-light);
}

/* Intro card (placed in scattered view like album cards) */
.intro-album-card {
    position: absolute;
    transform: rotate(var(--initial-rotation, -5deg));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    z-index: 10;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.intro-album-card:hover {
    transform: rotate(var(--hover-rotation, -2deg)) scale(var(--hover-scale, 1.1));
    z-index: 100;
}

.intro-album-card .intro-frame {
    background: #fff;
    padding: 22px 20px;
    width: 240px;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.5);
    border: 4px solid #000;
    transition: box-shadow 0.3s ease;
}

.intro-album-card:hover .intro-frame {
    box-shadow: 8px 8px 30px rgba(0,0,0,0.6);
}

/* Intro card in grid view */
.intro-grid-card {
    cursor: default;
}

.intro-grid-card .card-frame {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-grid-content {
    padding: 20px;
    color: #000;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

.intro-grid-content p {
    margin-bottom: 10px;
}

.intro-grid-content p:last-child {
    margin-bottom: 0;
}

.intro-frame {
    width: 240px;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
}

.intro-content {
    padding: 22px 20px;
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.7;
}

.intro-content p {
    margin-bottom: 12px;
}

.intro-content p:last-child {
    margin-bottom: 0;
}

.intro-content a {
    color: var(--link-color);
    text-decoration: none;
}

.intro-content a:hover {
    text-decoration: underline;
}

.intro-content .video-album-link {
    color: #000;
    text-decoration: underline;
}

/* Back button */
.back-btn {
    position: fixed;
    top: 25px;
    right: 30px;
    background: var(--card-bg);
    color: var(--text-dark);
    border: none;
    padding: 12px 22px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    display: none;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.back-btn:hover {
    transform: translateY(-1px);
}

.back-btn.visible {
    display: block;
}

/* Main content */
main {
    min-height: 100vh;
}

/* Scattered album view */
.albums-scattered {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 500px 50px 80px;
}

.albums-scattered.hidden {
    display: none;
}

.albums-scattered .album-card {
    transform: rotate(var(--initial-rotation, 0deg)) !important;
    opacity: 1 !important;
    animation: none !important;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 1s ease;
}

.albums-scattered .album-card:hover {
    transform: rotate(var(--hover-rotation, 0deg)) scale(var(--hover-scale, 1.15)) !important;
}

/* Grid album view */
.albums-grid {
    display: none;
    padding: 100px 50px 80px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 35px;
    max-width: 1400px;
    margin: 0 auto;
}

.albums-grid.active {
    display: grid;
}

/* Album card - Polaroid style */
.album-card {
    position: absolute;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 1s ease,
                z-index 0s 1s;
    transform-origin: center center;
}

.album-card:hover {
    z-index: 100;
    transform: rotate(var(--hover-rotation, 0deg)) scale(var(--hover-scale, 1.15));
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 1s ease,
                z-index 0s 0s;
}

.card-frame {
    background: var(--card-bg);
    padding: 12px 12px 0 12px;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.5);
    transition: box-shadow 0.3s ease;
    border: 4px solid #000;
}

.album-card:hover .card-frame {
    box-shadow: 8px 8px 35px rgba(0,0,0,0.7);
}

.card-image {
    width: 180px;
    height: 180px;
    overflow: hidden;
    background: #1a1a1a;
    position: relative;
    border: 4px solid #000;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.card-image .img-pixelated {
    z-index: 2;
}

.card-info {
    padding: 14px 4px 16px;
}

.card-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.3;
    margin-bottom: 4px;
}

.card-artist {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

/* Grid view album cards */
.albums-grid .album-card {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
}

.albums-grid .album-card:hover {
    transform: rotate(var(--hover-rotation, 0deg)) scale(var(--hover-scale, 1.15)) !important;
}

.albums-grid .intro-card .intro-frame {
    width: 100%;
}

/* Detail page */
.detail-page {
    display: none;
    min-height: 100vh;
    padding: 100px 60px 80px;
}

.detail-page.active {
    display: block;
}

.detail-content {
    display: flex;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    min-height: 500px;
}

.detail-left {
    flex-shrink: 0;
    position: relative;
}

.detail-video-frame {
    background: var(--card-bg);
    padding: 15px 15px 15px 15px;
    box-shadow: 6px 6px 30px rgba(0,0,0,0.5);
    transform: rotate(-2deg);
}

.detail-video-container {
    width: 380px;
    height: 380px;
    background: #111;
    overflow: hidden;
}

.detail-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-right {
    flex: 1;
    position: relative;
    padding-top: 10px;
}

.detail-title {
    font-family: 'UnifrakturMaguntia', cursive;
    font-size: 52px;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.1;
    background: var(--card-bg);
    padding: 20px 30px;
    display: inline-block;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.3);
}

/* Info bubbles */
.info-bubble {
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 12px 20px;
    font-size: 14px;
    display: inline-block;
    box-shadow: 3px 3px 12px rgba(0,0,0,0.25);
    position: absolute;
}

.info-bubble strong {
    font-weight: 600;
}

.bubble-added {
    bottom: -60px;
    left: 0;
    transform: rotate(-1deg);
}

.bubble-subtitle {
    top: 140px;
    left: 20px;
    transform: rotate(2deg);
}

/* More like this section */
.more-like-this {
    margin-top: 80px;
    padding-top: 40px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.more-label {
    background: var(--card-bg);
    color: var(--text-dark);
    display: inline-block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 25px;
}

.more-albums {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.more-albums .album-card {
    position: relative;
    transform: none !important;
}

.more-albums .album-card:hover {
    transform: rotate(var(--hover-rotation, 0deg)) scale(var(--hover-scale, 1.15)) !important;
}

.more-albums .card-image {
    width: 130px;
    height: 130px;
}

.more-albums .card-title {
    font-size: 13px;
    max-width: 130px;
}

.more-albums .card-artist {
    font-size: 11px;
    max-width: 130px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px) rotate(var(--initial-rotation, 0deg));
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(var(--initial-rotation, 0deg));
    }
}

.album-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: rotate(var(--initial-rotation, 0deg));
}

.album-card.animation-done {
    animation: none;
    opacity: 1;
    transform: rotate(var(--initial-rotation, 0deg));
}

/* Responsive */
@media (max-width: 1200px) {
    #fixedIntroCard {
        position: fixed !important;
        top: 100px !important;
        right: 20px !important;
        left: auto !important;
    }

    .albums-scattered {
        padding-top: 500px;
    }
}

@media (max-width: 900px) {
    .detail-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .detail-left {
        margin-bottom: 40px;
    }

    .detail-video-frame {
        transform: rotate(0deg);
    }

    .detail-video-container {
        width: 300px;
        height: 300px;
    }

    .detail-right {
        width: 100%;
    }

    .detail-title {
        margin-bottom: 20px;
        font-size: 36px;
    }

    .info-bubble {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
        right: auto !important;
        transform: none !important;
        margin: 10px;
    }

    .bubble-added {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .logo {
        left: 15px;
        top: 15px;
    }

    .logo-tile {
        width: 3px;
        height: 3px;
    }

    .logo-text {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .top-right-link {
        right: 15px;
        top: 20px;
        font-size: 11px;
    }

    .albums-scattered {
        padding: 500px 20px 50px;
    }

    .albums-grid {
        padding: 80px 20px 50px;
    }

    .albums-scattered {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .album-card {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }

    .album-card:hover {
        transform: rotate(var(--hover-rotation, 0deg)) scale(var(--hover-scale, 1.1)) !important;
    }

    .detail-page {
        padding: 80px 20px 50px;
    }

    .detail-video-container {
        width: 260px;
        height: 260px;
    }

    .detail-title {
        font-size: 28px;
        padding: 15px 20px;
    }

    .back-btn {
        right: 15px;
        top: 15px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Card size variations */
.card-small .card-image {
    width: 160px;
    height: 160px;
}

.card-large .card-image {
    width: 200px;
    height: 200px;
}
