* {
    overflow: hidden;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    max-height: 100vh;
    margin: 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    background-image: url("bg.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    outline: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body a {
    color: inherit;
}

body a:not(:hover) {
    text-decoration: none;
}

/* Content and Lyrics */
body .content {
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    height: calc(100% - 160px);
    z-index: 9;
    scroll-behavior: smooth;
}

body .content .lyrics {
    padding: 50vh 0;
    min-height: calc(100vh - 160px);
    width: calc(100% - 40px);
    margin: 0 20px;
    text-align: center;
    transition: all 0.25s ease;
    position: relative;
}

body .content .lyrics > div {
    position: relative;
    font-size: 40px;
    line-height: 80px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 10px 0;
}

body .content .lyrics > div.highlighted {
    color: #fff;
    font-weight: 700;
    font-size: 48px;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.8),
                 0 0 50px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Player Container */
body .player {
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    min-height: 160px;
    max-height: 160px;
    display: flex;
    flex-direction: row;
    outline: none;
    margin: 0 40px 120px 40px;
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body .player .left {
    width: 240px;
    min-width: 240px;
    background-image: url("ourImage.PNG");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 28px 0 0 28px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body .player .right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
}

body .player .right .top {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px 0 10px 0;
}

.songs {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Custom Audio Player */
body .player .right .bottom {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
}

#audio {
    display: none;
}

.custom-player {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* Play/Pause Button */
.play-pause-btn {
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.play-pause-btn:hover {
    transform: scale(1.05);
}

.play-pause-btn:active {
    transform: scale(0.95);
}

.play-pause-btn svg {
    width: 20px;
    height: 20px;
    color: white;
    pointer-events: none;
}

/* Progress Container */
.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}

.time-display {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    min-width: 40px;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Progress Bar */
.progress-bar {
    position: relative;
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #000000 0%, #666666 100%);
    border-radius: 3px;
    transition: width 0.1s linear;
    pointer-events: none;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(0, 0, 0, 0.2);
    transition: left 0.1s linear;
    pointer-events: none;
}

.progress-bar:hover .progress-handle {
    transform: translate(-50%, -50%) scale(1.2);
}

/* Overlay */
#overlay {
    position: fixed;
    display: block;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    z-index: 2;
    cursor: pointer;
}

/* Snow Animation */
.g-snows {
    width: 100vw;
    height: 100vh;
    cursor: none;
    background-color: rgba(238, 234, 234, 0);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.g-snows > li {
    opacity: 0;
    position: absolute;
    top: 0;
    z-index: 100;
    border-radius: 100%;
    background-color: #FFFFFF;
    background-repeat: no-repeat;
    background-size: 100% auto;
    animation-name: snow-drop;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    list-style: none;
}

.g-snows > li:nth-child(1) {
    left: 40%;
    width: 2px;
    height: 2px;
    animation-duration: 6810ms;
    animation-delay: 1393ms;
    filter: blur(1px);
}

.g-snows > li:nth-child(2) {
    left: 80%;
    width: 8px;
    height: 8px;
    animation-duration: 5005ms;
    animation-delay: 123ms;
    filter: blur(1px);
}

.g-snows > li:nth-child(3) {
    left: 28%;
    width: 13px;
    height: 13px;
    animation-duration: 10000ms;
    animation-delay: 4283ms;
    filter: blur(0px);
}

.g-snows > li:nth-child(4) {
    left: 16%;
    width: 15px;
    height: 15px;
    animation-duration: 7139ms;
    animation-delay: 4935ms;
    filter: blur(3px);
}

.g-snows > li:nth-child(5) {
    left: 21%;
    width: 1px;
    height: 1px;
    animation-duration: 6939ms;
    animation-delay: 3632ms;
    filter: blur(1px);
}

.g-snows > li:nth-child(6) {
    left: 45%;
    width: 15px;
    height: 15px;
    animation-duration: 7139ms;
    animation-delay: 4935ms;
    filter: blur(3px);
}

.g-snows > li:nth-child(7) {
    left: 65%;
    width: 10px;
    height: 10px;
    animation-duration: 8000ms;
    animation-delay: 2000ms;
    filter: blur(2px);
}

@keyframes snow-drop {
    0% {
        transform: translate(0, 0);
        opacity: 0.5;
        margin-left: 0;
    }
    10% {
        margin-left: 15px;
    }
    20% {
        margin-left: 20px;
    }
    25% {
        transform: translate(0, 166.6666666667px);
        opacity: 0.75;
    }
    30% {
        margin-left: 15px;
    }
    40% {
        margin-left: 0;
    }
    50% {
        transform: translate(0, 333.3333333333px);
        opacity: 1;
        margin-left: -15px;
    }
    60% {
        margin-left: -20px;
    }
    70% {
        margin-left: -15px;
    }
    75% {
        transform: translate(0, 500px);
        opacity: 0.5;
    }
    80% {
        margin-left: 0;
    }
    100% {
        transform: translate(0, 666.6666666667px);
        opacity: 0;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body .content {
        height: calc(100% - 180px);
    }

    body .content .lyrics {
        padding: 40vh 0;
        min-height: calc(100vh - 180px);
        width: calc(100% - 30px);
        margin: 0 15px;
    }

    body .content .lyrics > div {
        font-size: 24px;
        line-height: 44px;
    }

    body .content .lyrics > div.highlighted {
        font-size: 28px;
    }

    body .player {
        margin: 0 20px 130px 20px;
        min-height: 180px;
        max-height: 180px;
        border-radius: 24px;
    }

    body .player .left {
        width: 180px;
        min-width: 180px;
        border-radius: 24px 0 0 24px;
    }

    body .player .right {
        padding: 0 15px;
    }

    .songs {
        font-size: 12px;
    }

    .custom-player {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .play-pause-btn {
        align-self: center;
        width: 52px;
        height: 52px;
        min-width: 52px;
    }

    .play-pause-btn svg {
        width: 24px;
        height: 24px;
    }

    .progress-container {
        width: 100%;
    }
}

/* iPhone and Small Mobile Devices */
@media (max-width: 480px) {
    body .content .lyrics {
        width: calc(100% - 20px);
        margin: 0 10px;
        padding: 35vh 0;
    }

    body .content .lyrics > div {
        font-size: 18px;
        line-height: 36px;
        word-wrap: break-word;
    }

    body .content .lyrics > div.highlighted {
        font-size: 22px;
    }

    body .player {
        margin: 0 14px 130px 14px;
        border-radius: 20px;
    }

    body .player .left {
        width: 150px;
        min-width: 150px;
        border-radius: 20px 0 0 20px;
    }

    body .player .right {
        padding: 0 12px;
    }

    body .player .right .top {
        padding: 12px 0 8px 0;
    }

    .songs {
        font-size: 11px;
    }

    .time-display {
        font-size: 11px;
        min-width: 35px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    body .content .lyrics > div {
        font-size: 16px;
        line-height: 32px;
    }

    body .content .lyrics > div.highlighted {
        font-size: 19px;
    }

    body .player {
        margin: 0 10px 130px 10px;
        min-height: 170px;
        max-height: 170px;
    }

    body .player .left {
        width: 130px;
        min-width: 130px;
    }

    body .player .right {
        padding: 0 10px;
    }

    .songs {
        font-size: 10px;
    }

    .play-pause-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .play-pause-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Ensure proper touch handling on iOS */
@media (hover: none) and (pointer: coarse) {
    .play-pause-btn:hover {
        transform: none;
    }
    
    .play-pause-btn:active {
        transform: scale(0.95);
    }
    
    .progress-bar:hover .progress-handle {
        transform: translate(-50%, -50%);
    }
}
