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

body {
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    transition: all 0.3s ease;
}

body[data-theme="default"] {
    background: linear-gradient(135deg, #1a1a1a, #2c3e50);
}

body[data-theme="classic"] {
    background: linear-gradient(135deg, #8B4513, #D2691E);
}

body[data-theme="dark"] {
    background: linear-gradient(135deg, #000000, #434343);
}

body[data-theme="neon"] {
    background: linear-gradient(135deg, #FF1493, #00FFFF);
}

body[data-theme="default"] button:not(.clear-log-btn):not(:disabled) {
    background: #2ecc71;
}

body[data-theme="classic"] button:not(.clear-log-btn):not(:disabled) {
    background: #CD853F;
}

body[data-theme="dark"] button:not(.clear-log-btn):not(:disabled) {
    background: #666666;
}

body[data-theme="neon"] button:not(.clear-log-btn):not(:disabled) {
    background: #FF1493;
}

.container {
    width: 100%;
    max-width: 1600px;
    padding: 20px;
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 20px;
}

.game-area {
    flex: 1;
}

.game-table {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.dealer-area, .player-area {
    margin: 20px 0;
    text-align: center;
}

.dealer-cards, .player-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    min-height: 150px;
    padding: 20px;
}

.card {
    width: 100px;
    height: 145px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    background: #2ecc71;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.game-status {
    text-align: center;
    font-size: 24px;
    margin-top: 20px;
    min-height: 36px;
}

.dealer-score, .player-score {
    font-size: 24px;
    margin: 10px 0;
}

.question-card {
    background: white;
    color: #2c3e50;
    font-size: 48px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 145px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.log-area {
    width: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.log-container {
    height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.log-entry {
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.log-entry.highlight {
    border-left: 3px solid #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.log-entry.new-game {
    border-left: 3px solid #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.log-entry.player-action {
    border-left: 3px solid #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.log-entry.dealer-action {
    border-left: 3px solid #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.log-entry.game-result {
    border-left: 3px solid #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-area, .settings-area, .theme-area {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 5px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #95a5a6;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2ecc71;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
}

.theme-btn.active {
    border-color: #2ecc71;
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.color-preview.default { background: linear-gradient(135deg, #1a1a1a, #2c3e50); }
.color-preview.classic { background: linear-gradient(135deg, #8B4513, #D2691E); }
.color-preview.dark { background: linear-gradient(135deg, #000000, #434343); }
.color-preview.neon { background: linear-gradient(135deg, #FF1493, #00FFFF); }

[data-theme="default"] {
    --bg-gradient: linear-gradient(135deg, #1a1a1a, #2c3e50);
    --primary-color: #2ecc71;
    --hover-color: #27ae60;
}

[data-theme="classic"] {
    --bg-gradient: linear-gradient(135deg, #8B4513, #D2691E);
    --primary-color: #CD853F;
    --hover-color: #8B4513;
}

[data-theme="dark"] {
    --bg-gradient: linear-gradient(135deg, #000000, #434343);
    --primary-color: #666666;
    --hover-color: #333333;
}

[data-theme="neon"] {
    --bg-gradient: linear-gradient(135deg, #FF1493, #00FFFF);
    --primary-color: #FF1493;
    --hover-color: #FF69B4;
}

@keyframes dealCard {
    from {
        transform: translate(-50%, -100vh) rotate(720deg) scale(0.1);
        opacity: 0;
    }
    to {
        transform: translate(0, 0) rotate(0) scale(1);
        opacity: 1;
    }
}

@keyframes drawCard {
    from {
        transform: translate(-100%, 0) rotate(-180deg) scale(0.1);
        opacity: 0;
    }
    to {
        transform: translate(0, 0) rotate(0) scale(1);
        opacity: 1;
    }
}

@keyframes flipCard {
    0% {
        transform: rotateY(0deg) scale(1);
    }
    50% {
        transform: rotateY(90deg) scale(1.1);
    }
    100% {
        transform: rotateY(180deg) scale(1);
    }
}

.card {
    position: relative;
    transition: transform 0.3s ease;
}

.card.new-card {
    animation: drawCard 0.5s ease-out forwards;
}

.card.initial-deal {
    animation: dealCard 0.5s ease-out forwards;
}

.card.flipping {
    animation: flipCard 0.5s ease-in-out forwards;
}

.card.flipCard {
    animation: flipCard 0.5s ease-in-out forwards;
}

.player-name-input {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 150px;
}

.player-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.reset-btn {
    width: 100%;
    background: #e74c3c;
    margin-top: 15px;
    padding: 10px;
}

.reset-btn:hover {
    background: #c0392b;
} 