@import url('reset.css');
@import url('font.css');

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

html, body {
    overflow-x: hidden;
    width: 100%
}

#puzzle-screen {
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2vh 2vw;
    background-color: #C6F7FF;
}

.puzzle-header {
    margin-bottom: 3vh;
    text-align: center;
    z-index: 10
}

.puzzle-title {
    font-size: 4vh;
    font-weight: 700;
    color: black;
    text-transform: uppercase;
    letter-spacing: 0.2vw;
    margin: 0
}

.puzzle-container {
    width: 70vw;
    height: 70vw;
    max-width: 500px;
    max-height: 500px;
    position: relative;
    z-index: 10;
    margin: 0 auto 3vh;
    display: flex;
    align-items: center;
    justify-content: center
}

.puzzle-circle {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent
}

.puzzle-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none
}

.puzzle-circle.outer {
    width: 100%;
    height: 100%;
    z-index: 1
}

.puzzle-circle.central {
    width: 70%;
    height: 70%;
    z-index: 2;
    top: 15%;
    left: 15%
}

.puzzle-circle.inner {
    width: 50%;
    height: 50%;
    z-index: 3;
    top: 25%;
    left: 25%
}

.puzzle-circle:active {
    transform: scale(0.95)
}

.puzzle-circle.completed {
    animation: complete-pulse 0.6s ease forwards
}

@keyframes complete-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.spin-puzzle-small-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-repeat: no-repeat;
    z-index: 0;
    background-position: -100vw -100vh;
    animation: small-circular-move 3s linear infinite;
    pointer-events: none
}

@keyframes small-circular-move {
    0% { background-position: -100vw -100vh; }
    100% { background-position: 0 0; }
}

.spin-puzzle-triangles {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none
}

.virtual-beasts-screen {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 100;
    padding: 5vh 20px;
    padding-top: 10vh;
    background-color: #C6F7FF;
}

.virtual-beasts-screen.active {
    opacity: 1;
    pointer-events: auto
}

#puzzle-screen.completed {
    display: none
}

.logo-container {
    display: flex;
    gap: 2px;
    padding: 40px;
    justify-content: center;
    align-items: center;
    z-index: 10;
    margin-bottom: 2vh
}

.letter {
    position: relative;
    width: 60px;
    height: 80px
}

.letter-space {
    width: 30px
}

.letter img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain
}

.letter .part1 {
    top: 0;
    left: 0;
    z-index: 1
}

.letter .part2 {
    top: 0;
    left: 0;
    z-index: 2
}


@media (max-width: 768px) {
    .logo-container {
        gap: 1px;
        padding: 20px
    }
    
    .letter {
        width: 40px;
        height: 53px;
    }
    
    .letter-space {
        width: 20px
    }
}

@media (max-width: 480px) {
    .letter {
        width: 30px;
        height: 40px;
    }
    
    .letter-space {
        width: 15px
    }
}


.physics-screen {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    background: linear-gradient(to top, #005D62 0%, #C6F7FF 100%);
}

.physics-screen.active {
    opacity: 1;
    pointer-events: auto
}

#physics-container {
    width: 100%;
    height: calc(100vh - 150px);
    position: relative;
    z-index: 1
}

#physics-container canvas {
    display: block;
    width: 100%;
    height: 100%
}

.animals-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4vw;
    padding: 40px;
    margin-bottom: 2vh;
    z-index: 5;
    min-height: 300px
}

.animal {
    position: relative;
    width: 150px;
    height: 200px;
    cursor: pointer;
    transition: transform 0.3s ease
}

.animal:hover {
    transform: translateY(-10px)
}

.animal-img {
    width: 100%;
    height: 100%;
    object-fit: contain
}
.animal-message-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease
}

.animal-message-modal.active {
    opacity: 1;
    pointer-events: auto
}
.modal-content {
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease
}

.animal-message-modal.active .modal-content {
    transform: scale(1)
}

.modal-text {
    font-size: 18px;
    line-height: 1.6;
    color: #002828;
    margin-bottom: 30px;
    white-space: pre-line
}

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

.modal-btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease
}

.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2)
}

.take-btn {
    background: #00bcd4;
    color: white
}

.leave-btn {
    background: #002828;
    color: white
}

/* ===== ADAPTIVE ===== */
@media (max-width: 768px) {
    .animals-container {
        gap: 2vw;
        padding: 20px
    }
    
    .animal {
        width: 100px;
        height: 130px
    }
    
    .modal-content {
        padding: 30px
    }
    
    .modal-text {
        font-size: 16px
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 10px
    }
}

.paw-music {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
    background-image: url('../pictures/paw-music.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}



.meowmusic-screen {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    background: linear-gradient(to bottom, #6DB1B8, #C6F7FF);
    position: relative;
}

.meowmusic-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.meowmusic-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.meowmusic-title {
    font-size: 48px;
    font-weight: 900;
    color: #002828;
    letter-spacing: 5px;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.vinyl-wrapper {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.vinyl-record {
    width: 450px;
    height: 450px;
    border-radius: 50%;
    border: 8px solid #002828;
    overflow: hidden;
    position: relative;
    animation: rotate 10s linear infinite paused;
    box-shadow: 0 10px 40px rgba(0, 40, 40, 0.3);
}

.vinyl-record.playing {
    animation-play-state: running;
}

.vinyl-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.tracks-list {
    background: #002828;
    border: 4px solid #002828;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
}

.track-row {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid rgba(0, 188, 212, 0.3);
    cursor: pointer;
}

.track-row:last-child {
    border-bottom: none;
}

.track-row:hover {
    background: rgba(0, 188, 212, 0.2);
}

.track-row.active {
    background: rgba(0, 188, 212, 0.4);
    border-left: 4px solid #00bcd4;
}

.track-num {
    font-size: 24px;
    font-weight: 900;
    color: #00bcd4;
    width: 50px;
    text-align: center;
}

.track-genre {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
}

.track-animal {
    font-size: 16px;
    font-weight: 700;
    color: #00bcd4;
    padding: 5px 15px;
    background: rgba(0, 188, 212, 0.2);
    border-radius: 5px;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.control-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #002828;
    border: 4px solid #002828;
    color: #00bcd4;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #00bcd4;
    color: #002828;
    transform: scale(1.1);
}

.play-btn {
    width: 90px;
    height: 90px;
    font-size: 32px;
}

.play-btn.playing {
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (max-width: 768px) {
    .meowmusic-title {
        font-size: 36px;
    }
    
    .vinyl-record {
        width: 280px;
        height: 280px;
    }
    
    .track-row {
        padding: 15px;
    }
    
    .track-genre {
        font-size: 16px;
    }
    
    .control-btn {
        width: 55px;
        height: 55px;
        font-size: 18px;
    }
    
    .play-btn {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }
}