/**
 * Sâm Game - Professional Card Game Scoring System
 * Design: Dark Luxury Theme with Gold Accents
 * Author: Alex Do
 */

/* ===== CSS Variables ===== */
:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --accent-hover: #ff6b6b;
    --gold: #f1c40f;
    --gold-dark: #d4a80a;
    --success: #00d9a5;
    --warning: #ffa502;
    --danger: #ff4757;
    --bg-dark: #0f0f1a;
    --bg-card: rgba(22, 33, 62, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6c757d;
    --border-color: rgba(233, 69, 96, 0.3);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(233, 69, 96, 0.3);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(233, 69, 96, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(241, 196, 15, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--primary) 100%);
    pointer-events: none;
    z-index: -1;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

.text-gold { color: var(--gold); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-secondary); }

/* ===== Layout ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-glow);
}

.logo-text h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--accent);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.btn-gold:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #00b894 100%);
    color: var(--bg-dark);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #ff6b6b 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-music {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.btn-music:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
}

.btn-music.playing {
    animation: pulse-music 1.5s infinite;
}

@keyframes pulse-music {
    0%, 100% { box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(155, 89, 182, 0.6); }
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-title-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ===== Main Content ===== */
.main {
    padding: 40px 0;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1200px) {
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .grid-5, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ===== Player Cards ===== */
.player-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.4s ease forwards;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--player-color, var(--accent));
}

.player-card:hover {
    transform: translateY(-5px);
    border-color: var(--player-color, var(--accent));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.player-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
    background: var(--player-color, var(--accent));
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.player-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.player-rank {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.player-score {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 5px;
}

.player-score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-input-group {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.player-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
}

.player-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

.player-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger);
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.player-card:hover .player-delete {
    opacity: 1;
}

.player-delete:hover {
    transform: scale(1.1);
}

/* ===== Rank Badges ===== */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.2rem;
    position: relative;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    color: #1a1a2e;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #1a1a2e;
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b8860b 100%);
    color: white;
}

.rank-4 {
    background: var(--secondary);
    color: var(--text-secondary);
}

.rank-5 {
    background: var(--primary);
    color: var(--text-muted);
}

/* ===== Add Player Section ===== */
.add-player-section {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    cursor: pointer;
    transition: var(--transition);
}

.add-player-section:hover {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.1);
}

.add-player-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 15px;
}

.add-player-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===== Game Controls ===== */
.game-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 120px;
}

.control-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ===== Ranking Table ===== */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.ranking-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

.ranking-table tbody tr {
    transition: var(--transition);
}

.ranking-table tbody tr:hover {
    background: rgba(233, 69, 96, 0.1);
}

.ranking-table .rank-cell {
    width: 60px;
}

.ranking-table .name-cell {
    font-weight: 600;
}

.ranking-table .score-cell {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.ranking-table .prize-cell {
    color: var(--success);
    font-weight: 600;
}

/* ===== Prize Calculator ===== */
.prize-calculator {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 30px;
}

.prize-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.prize-row:last-child {
    border-bottom: none;
}

.prize-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prize-percent {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.prize-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--gold);
}

.prize-total-label {
    font-size: 1.1rem;
    font-weight: 600;
}

.prize-total-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
}

/* ===== Settings Section ===== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--text-primary);
    font-size: 1rem;
}

.setting-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.modal-body {
    margin-bottom: 20px;
}

/* ===== Music Player Styles ===== */
.music-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.music-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.music-item:hover {
    border-color: var(--accent);
    background: var(--primary);
}

.music-item.active {
    border-color: #9b59b6;
    background: rgba(155, 89, 182, 0.2);
}

.music-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-info i {
    color: #9b59b6;
    font-size: 1.2rem;
}

.music-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

/* ===== Alert Messages ===== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(0, 217, 165, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 165, 2, 0.2);
    border: 1px solid var(--warning);
    color: var(--warning);
}

/* ===== Footer ===== */
.footer {
    background: var(--primary);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

.footer-credit {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--accent);
    }
    50% {
        box-shadow: 0 0 20px var(--accent), 0 0 30px var(--accent);
    }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Stagger animations */
.player-card:nth-child(1) { animation-delay: 0ms; }
.player-card:nth-child(2) { animation-delay: 100ms; }
.player-card:nth-child(3) { animation-delay: 200ms; }
.player-card:nth-child(4) { animation-delay: 300ms; }
.player-card:nth-child(5) { animation-delay: 400ms; }

/* ===== Utility Classes ===== */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    
    .game-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-input {
        width: 100%;
    }
    
    .modal {
        padding: 20px;
        margin: 10px;
    }
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease forwards;
    min-width: 280px;
}

.toast.success {
    border-color: var(--success);
    background: rgba(0, 217, 165, 0.1);
}

.toast.error {
    border-color: var(--danger);
    background: rgba(255, 71, 87, 0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state-text {
    font-size: 0.95rem;
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Progress Bar ===== */
.progress-bar {
    height: 8px;
    background: var(--secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ===== Tab Navigation ===== */
.tabs {
    display: flex;
    gap: 5px;
    padding: 5px;
    background: var(--secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--primary);
}

.tab.active {
    background: var(--accent);
    color: white;
}

/* ===== Rule Tags ===== */
.rule-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.rule-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.rule-tag:hover,
.rule-tag.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.rule-tag-custom {
    background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
    color: white;
    border: none;
}

.rule-tag-custom:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}

/* ===== Session Info ===== */
.session-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.session-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.session-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.session-value {
    font-weight: 600;
    color: var(--gold);
}

/* ===== Bill Preview ===== */
.bill-preview {
    background: white;
    color: #333;
    padding: 30px;
    border-radius: var(--radius);
    max-width: 600px;
    margin: 0 auto;
}

.bill-header {
    text-align: center;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.bill-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
}

.bill-subtitle {
    font-size: 0.9rem;
    color: #666;
}

.bill-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.bill-table th,
.bill-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.bill-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.bill-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px dashed #ccc;
    color: #666;
    font-size: 0.85rem;
}

/* ===== New Round Options ===== */
.new-round-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.new-round-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.new-round-option:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.new-round-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.new-round-text {
    display: flex;
    flex-direction: column;
}

.new-round-text strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.new-round-text span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===== Welcome Modal ===== */
.welcome-modal {
    text-align: center;
    padding: 40px;
    max-width: 450px;
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.welcome-title {
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.welcome-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.welcome-desc strong {
    color: var(--accent);
}

.welcome-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.welcome-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}
