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

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

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

/* Header */
#header {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    color: #ffd700;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: #ffd700;
    color: #1a1a2e;
}

.user-info {
    display: flex;
    gap: 10px;
}

.btn-login,
.btn-register {
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.btn-login:hover {
    background: #fff;
    color: #1a1a2e;
}

.btn-register {
    background: #ffd700;
    color: #1a1a2e;
    font-weight: bold;
}

.btn-register:hover {
    background: #ffb700;
}

/* Main Content */
main {
    margin-top: 80px;
    padding-bottom: 50px;
}

.section {
    padding: 40px 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #ffd700;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 183, 0, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 30px;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #ccc;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #1a1a2e;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #ffd700;
}

.stat-label {
    font-size: 14px;
    color: #ccc;
    margin-top: 10px;
}

/* Room List */
.room-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.room-id {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
}

.room-creator {
    color: #ccc;
    margin: 10px 0;
}

.room-players {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.player-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.player-badge.empty {
    background: rgba(255, 255, 255, 0.2);
}

.join-btn {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    cursor: pointer;
}

.join-btn:hover {
    background: #2ecc71;
}

.create-room {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.create-room input {
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 150px;
}

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.summary-item .label {
    display: block;
    color: #ccc;
    font-size: 14px;
}

.summary-item .value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #ffd700;
    margin-top: 10px;
}

/* Ranking Table */
.ranking-section,
.records-section {
    margin-bottom: 40px;
}

.ranking-section h3,
.records-section h3 {
    margin-bottom: 20px;
    color: #ffd700;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
}

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

.ranking-table th {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.ranking-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Record List */
.record-list,
.transaction-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.record-item:last-child {
    border-bottom: none;
}

.record-info {
    display: flex;
    gap: 20px;
}

.record-result {
    font-weight: bold;
}

.record-result.win {
    color: #27ae60;
}

.record-result.lose {
    color: #e74c3c;
}

/* Card Management */
.card-balance {
    text-align: center;
    margin-bottom: 30px;
}

.balance-label {
    font-size: 18px;
    color: #ccc;
}

.balance-value {
    font-size: 64px;
    font-weight: bold;
    color: #ffd700;
}

.card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.action-card h3 {
    margin-bottom: 20px;
    color: #ffd700;
}

.action-card select,
.action-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.action-card .hint {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 15% auto;
    padding: 30px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ffd700;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffd700;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-content input:focus {
    outline: none;
    border-color: #ffd700;
}

.forgot-link {
    text-align: center;
    color: #3498db;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #ccc;
    padding: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
}
