﻿* {
    margin: 0;
    padding: 0;
}

html,
body {
    background: #000 !important;
    color-scheme: dark;
    overflow: hidden;
}

.webgl {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
}

.text-white {
    color: white !important;
}

.btn-fullscreen-toggle {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ff4d6d, #e6395c);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

    .btn-fullscreen-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 12px rgba(255, 77, 109, 0.6);
    }

    .btn-fullscreen-toggle i {
        font-size: 14px; /* giảm icon cho vừa với nút */
        color: #fff;
    }

body.portrait-mode #landscape-warning {
    display: flex;
    opacity: 1;
}

/* ---- MÀN HÌNH CẢNH BÁO XOAY NGANG ---- */
#landscape-warning {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient( ellipse at center, #1c1a3a 0%, #0c0a1f 100% );
    color: #e0eaff;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

body.portrait #landscape-warning {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

#landscape-warning .warning-content {
    position: relative;
    z-index: 2;
    padding: 2rem 2.5rem;
    border-radius: 20px;
    background: rgba(28, 26, 58, 0.6);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(173, 216, 230, 0.3);
    box-shadow: 0 0 40px rgba(78, 88, 216, 0.5), 0 0 15px rgba(255, 255, 255, 0.1), inset 0 0 8px rgba(173, 216, 230, 0.2);
    transform: scale(0.95);
    opacity: 0;
    animation: fadeInContent 0.6s 0.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeInContent {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#landscape-warning h1 {
    font-family: "Orbitron", "Montserrat", sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(230, 230, 255, 0.8), 0 0 4px rgba(255, 255, 255, 1);
}

    #landscape-warning h1:nth-of-type(2) {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        opacity: 0.8;
    }

#landscape-warning p {
    font-size: 1.1rem;
    color: #c0c8ff;
    line-height: 1.5;
    text-shadow: 0 0 6px rgba(192, 200, 255, 0.7);
}

    #landscape-warning p:last-of-type {
        margin-top: 1rem;
        font-weight: bold;
        letter-spacing: 1px;
    }

#landscape-warning .stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: transparent;
    overflow: hidden;
}

    #landscape-warning .stars-bg::before,
    #landscape-warning .stars-bg::after {
        content: "";
        position: absolute;
        width: 200%;
        height: 200%;
        top: -50%;
        left: -50%;
        background-image: radial-gradient(circle, #fff 1px, transparent 1px), radial-gradient(circle, #c0c8ff 1px, transparent 1px), radial-gradient(circle, #fff 0.5px, transparent 0.5px);
        background-size: 100px 100px, 150px 150px, 60px 60px;
        background-position: 0 0, 50px 50px, 30px 30px;
        opacity: 0;
        animation: stars-move 30s linear infinite, fadeInStars 1s ease-out forwards;
    }

    #landscape-warning .stars-bg::after {
        background-size: 150px 150px, 80px 80px, 120px 120px;
        background-position: 75px 75px, 40px 40px, 10px 10px;
        animation-duration: 45s;
    }

@keyframes fadeInStars {
    to {
        opacity: 0.6;
    }
}

@keyframes stars-move {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-50%);
    }
}

#romantic-title {
    position: absolute;
    top: 10px;
    left: 70px; /* dịch qua phải để không che nút fullscreen */
    z-index: 1001; /* cao hơn canvas và nút khác */
    font-size: 1.8rem;
    color: #ffffff;
    font-family: "Noto Sans", cursive;
    text-shadow: 0 0 15px #ff69b4, 0 0 5px #ffffff;
    animation: glow 2s ease-in-out infinite alternate;
}


@keyframes glow {
    from {
        text-shadow: 0 0 10px #ff69b4, 0 0 5px #ffffff;
    }

    to {
        text-shadow: 0 0 20px #ff69b4, 0 0 10px #ffffff;
    }
}

@media (max-width: 600px) {
    #romantic-title {
        font-size: 1.5rem;
    }
}

.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.music-btn {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ff4d6d, #e6395c);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

    .music-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 12px rgba(255, 77, 109, 0.6);
    }

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

    .music-btn svg {
        width: 24px;
        height: 24px;
        fill: #fff;
    }

.volume-control {
    width: 120px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 77, 109, 0.5);
    margin-top: 10px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .volume-control.visible {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    .volume-control input {
        width: 100%;
        height: 8px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 4px;
        outline: none;
        cursor: pointer;
        -webkit-appearance: none;
    }

        .volume-control input::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            background: #ff4d6d;
            border-radius: 50%;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
        }

        .volume-control input::-moz-range-thumb {
            width: 16px;
            height: 16px;
            background: #ff4d6d;
            border-radius: 50%;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
            border: none;
        }

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
    .music-control {
        right: 15px;
    }

    .music-btn {
        width: 35px;
        height: 35px;
    }

        .music-btn svg {
            width: 22px;
            height: 22px;
        }

    .volume-control {
        width: 100px;
        margin-top: 8px;
    }

        .volume-control input {
            height: 10px;
        }

            .volume-control input::-webkit-slider-thumb {
                width: 18px;
                height: 18px;
            }

            .volume-control input::-moz-range-thumb {
                width: 18px;
                height: 18px;
            }
}

/* Hiệu ứng tim đập mạnh */
@keyframes pulseHeart {
    0% {
        transform: scale(1);
        color: #ffffff;
        text-shadow: 0 0 5px rgba(255, 100, 100, 0.3);
    }

    25% {
        transform: scale(1.35);
        color: #ff4b4b;
        text-shadow: 0 0 25px rgba(255, 50, 50, 0.8);
    }

    50% {
        transform: scale(0.95);
        color: #ffb3b3;
        text-shadow: 0 0 10px rgba(255, 100, 100, 0.6);
    }

    75% {
        transform: scale(1.3);
        color: #ff6666;
        text-shadow: 0 0 25px rgba(255, 50, 50, 0.8);
    }

    100% {
        transform: scale(1);
        color: #ffffff;
        text-shadow: 0 0 5px rgba(255, 100, 100, 0.3);
    }
}

/* Khi chưa bấm tim — nháy mạnh hơn */
.heart-pulse {
    animation: pulseHeart 1.2s infinite ease-in-out;
    transform-origin: center;
}
