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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a3a2c, #2d6a4f);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #a8e6cf; text-decoration: none; }
a:hover { color: #fff; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.logo { font-size: 1.8rem; font-weight: bold; }

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    padding: 8px 16px;
    border-radius: 20px;
    transition: background 0.3s;
}

nav ul li a:hover {
    background: rgba(255,255,255,0.2);
}

.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
}

.hero {
    text-align: center;
    padding: 80px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    margin: 20px;
}

.hero h2 { font-size: 2.5rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; color: #ccc; }

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: #e63946;
    color: #fff;
    box-shadow: 0 4px 15px rgba(230,57,70,0.4);
}

.btn-primary:hover {
    background: #c1121f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230,57,70,0.6);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.feature-icon { font-size: 3rem; display: block; margin-bottom: 15px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

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

.stat-item span { display: block; font-size: 0.9rem; color: #aaa; }
.stat-item strong { font-size: 2rem; }

.game-container {
    text-align: center;
}

#gameArea {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

.player-area {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 20px;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    min-height: 80px;
}

.cards .card {
    background: #fff;
    color: #333;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s;
    user-select: none;
}

.cards .card.selected {
    transform: translateY(-15px);
    border: 2px solid #e63946;
}

.table-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.play-area {
    min-height: 100px;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 20px;
    width: 100%;
    max-width: 600px;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#gameInfo {
    margin-top: 20px;
    font-size: 1.1rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    overflow: hidden;
}

.history-table th, .history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.history-table th {
    background: rgba(255,255,255,0.1);
    font-weight: bold;
}

.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #2d6a4f;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #fff;
}

.login-form {
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.9);
    font-size: 1rem;
}

.error { color: #e63946; background: rgba(230,57,70,0.2); padding: 10px; border-radius: 10px; }
.success { color: #a8e6cf; background: rgba(168,230,207,0.2); padding: 10px; border-radius: 10px; }

footer {
    text-align: center;
    padding: 20px;
    margin-top: auto;
    background: rgba(0,0,0,0.3);
}

footer p { color: #aaa; font-size: 0.9rem; }
footer a { color: #a8e6cf; }

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: rgba(0,0,0,0.8);
        position: absolute;
        top: 60px;
        right: 20px;
        border-radius: 10px;
        padding: 10px;
    }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }
    .hero h2 { font-size: 1.8rem; }
    .features { grid-template-columns: 1fr; }
}