/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Arial', sans-serif;
}

body {
    min-height: 100vh;
    background: url("Images/mainBG.jpg") no-repeat center center fixed;
    background-size: cover;
    color: #fafafa;
    /* h2 and h3 inherit this now */
}

p {
    color: #1f3252 !important;
}

h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 5px;
    color: #1f3252;
    text-shadow: 0 0 8px rgba(50, 90, 155, 0.5);
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px;
    color: #1f3252;
    text-shadow: 0 0 8px rgba(50, 90, 155, 0.5);
    font-weight: 600;
}

/* Links and Interactive Elements */
a {
    color: #1f3252;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
i:hover {
    color: #a1c4fd;
}

a:active,
i:active {
    color: #ff6f61;
}

/* Header and Navbar */
header {
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(31, 50, 82, 0.2);
    /* Semi-transparent dark blue */
    backdrop-filter: blur(12px);
    /* Blur effect */
    -webkit-backdrop-filter: blur(12px);
    /* Safari support */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Subtle shadow */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Optional: faint border */
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.navbar .logo a {
    font-size: 2rem;
    font-weight: 600;
    color: #fafafa;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar .logo a:hover {
    color: #a1c4fd;
    transform: scale(1.05);
}

.navbar .links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.navbar a {
    font-size: 1.2rem;
    font-weight: 500;
    color: #fafafa;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.navbar li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #a1c4fd;
    transition: width 0.3s ease-in-out;
}

.navbar li a:hover::before {
    width: 100%;
}

.navbar li a:hover {
    color: #a1c4fd;
}

.navbar .action-button {
    background: #a1c4fd;
    color: #1f3252;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar .action-button:hover {
    background: #7b798f;
    color: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 111, 97, 0.5);
}

.navbar .toggle-button {
    color: #fafafa;
    font-size: 1.8rem;
    cursor: pointer;
    display: none;
    transition: color 0.3s ease;
}

.navbar .toggle-button:hover {
    color: #a1c4fd;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    width: 100%;
    background: rgba(31, 50, 82, 0.2);
    /* Matching transparent blur */
    backdrop-filter: blur(12px);
    /* Blur effect */
    -webkit-backdrop-filter: blur(12px);
    /* Safari support */
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.open {
    height: 300px;
    display: block;
}

.dropdown-menu li {
    padding: 1rem;
    display: flex;
    justify-content: center;
    list-style: none;
}

.dropdown-menu a {
    font-size: 1.3rem;
    color: #fafafa;
    transition: color 0.3s ease, transform 0.3s ease;
}

.dropdown-menu a:hover {
    color: #a1c4fd;
    transform: translateX(5px);
}

.dropdown-menu .action-button {
    width: 80%;
    margin: 1rem auto;
    display: block;
    background: #a1c4fd;
    color: #1f3252;
    padding: 0.75rem;
    border-radius: 25px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.dropdown-menu .action-button:hover {
    background: #ff6f61;
    color: #fafafa;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(255, 111, 97, 0.5);
}

/* Responsive Design */
@media (max-width: 992px) {

    .navbar .links,
    .navbar .action-button {
        display: none;
    }

    .navbar .toggle-button {
        display: block;
    }

    .dropdown-menu {
        display: block;
    }
}

@media (max-width: 576px) {
    header {
        padding: 1rem;
    }

    .navbar .logo a {
        font-size: 1.5rem;
    }

    .navbar .toggle-button {
        font-size: 1.5rem;
    }

    .dropdown-menu.open {
        height: 280px;
    }

    .dropdown-menu a {
        font-size: 1.1rem;
    }

    .dropdown-menu .action-button {
        width: 90%;
        padding: 0.6rem;
    }
}

/* Info Block */
.info-block {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid #c3b6e5;
    border-radius: 25px;
    padding: 20px;
    width: 80%;
    margin: 20px auto;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.info-block p {
    color: #f0f0f0;
    font-size: 1.2rem;
}

.item-list {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Other Elements */
.info-icon {
    font-size: 60px;
    color: #1877f2; /* Facebook blue */
    margin: 20px;
    transition: transform 0.3s ease;
}

.info-icon:hover {
    color: #1f32527e;
    transform: scale(1.5);
}

.cropped-avatar {
    border-radius: 50%;
    width: 300px;
    height: 300px;
    object-fit: cover;
    margin-bottom: 2%;
    transition: transform 0.3s ease;
}

.cropped-avatar:hover {
    transform: scale(1.05);
}

.upload-picture {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    margin: 10px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.upload-picture:hover {
    transform: scale(1.05);
}

/* Playlist Container */
.playlist-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Exactly 2 columns */
    gap: 25px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Song Card */
.song-card {
    background: rgba(46, 46, 74, 0.9);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.song-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(161, 196, 253, 0.6);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {

    /* Tablets and smaller */
    .playlist-container {
        grid-template-columns: 1fr;
        /* Switch to 1 column on smaller screens */
        gap: 20px;
    }

    .song-card {
        padding: 10px;
    }
}

@media (max-width: 480px) {

    /* Phones */
    .playlist-container {
        grid-template-columns: 1fr;
        /* 1 column for phones */
        gap: 15px;
        padding: 10px;
    }

    .song-card {
        padding: 8px;
    }

    .video-wrapper iframe {
        border-radius: 8px;
        /* Slightly smaller radius for phones */
    }

    .info-block {
        width: 90%;
        /* Narrower on phones */
        padding: 15px;
    }
}

/* Bau Cua Specific Styles */
.baucuaBetTable,
.baucuaBetTable th,
.baucuaBetTable td {
    border: 1px solid #000;
    border-collapse: collapse;
}

.baucuaBetTable th,
.baucuaBetTable td {
    padding: 20px;
    text-align: center;
}

.baucuaBetTable .betButton,
.starBaucuaButton {
    background: #c3b6e5;
    border: 2px solid #4a2c2a;
    border-radius: 10px;
    padding: 5px;
    transition: background 0.3s ease;
}

.baucuaBetTable .betButton:hover,
.starBaucuaButton:hover {
    background: #a1c4fd;
}

.baucua-picture {
    max-height: 150px;
    max-width: 150px;
    object-fit: cover;
}

.starBaucuaButton {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 100px;
    height: 50px;
}

.baucuaMusic {
    position: fixed;
    left: 20px;
    bottom: 20px;
}