html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('windows_7_logon_screen_wallpaper_official_highres_by_fantomnotphantom_dew43iw.jpg') no-repeat center center fixed;
    background-size: cover;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    transition: background 0.5s ease-in-out;
}

.container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: url('aero_glass_clipart_texture_by_diamond00744_d671l1n.png');
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease-in-out;
    overflow: auto;
}

h1 {
    text-align: center;
    font-size: 2rem;
    color: white;
}

.game-area {
    max-width: fit-content;
    padding-top: 1px;
    padding-bottom: 1px;
    padding-left: 2em;
    padding-right: 2em;
    margin-left: auto;
    margin-right: auto;
    border-radius: 1.2rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease-in-out;
}

.dealer-section, .player-section {
    margin: 2em 0;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.controls {
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

button, #close-popup {
    font-size: 1.2rem;
    padding: 0.8em 1.2em;
    margin: 1em;
    border: none;
    background: linear-gradient(to bottom, #0078D7, #005A9E);
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 1rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    transform: scale(1);
}

button:hover:not(:disabled), #close-popup:hover:not(:disabled) {
    background: linear-gradient(to bottom, #1490E0, #0078D7);
    transform: scale(1.05);
}

button:disabled, #close-popup:disabled {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.message {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1em;
    min-height: 2.5em;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    border-radius: 0.5em;
    transition: all 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    padding: 2em;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    border-radius: 1.2rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.2em;
    z-index: -1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translate(-50%, -50%); }
    to { opacity: 0; transform: translate(-50%, -60%); }
}