/* Royal Cards - Premium Casino Theme */
/* Color Palette: Copper & Slate with Gold Accents */

:root {
    /* Primary Colors */
    --bg-primary: #0D0D0D;
    --bg-secondary: #1A1A1A;
    --bg-tertiary: #2A2A2A;
    --bg-card: #1E1E1E;
    
    /* Accent Colors */
    --gold-primary: #D4AF37;
    --gold-secondary: #B8860B;
    --gold-light: #F4E4BC;
    --copper: #B87333;
    --copper-light: #D4A574;
    
    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #707070;
    
    /* Game Colors */
    --red-suit: #DC2626;
    --black-suit: #1F1F1F;
    --green-table: #0D3B2E;
    --green-table-light: #1A5C4A;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #B8860B 50%, #D4AF37 100%);
    --gradient-dark: linear-gradient(180deg, #1A1A1A 0%, #0D0D0D 100%);
    --gradient-card: linear-gradient(145deg, #2A2A2A 0%, #1E1E1E 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--gradient-dark);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    font-size: 2rem;
    color: var(--gold-primary);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.logo h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-stats {
    display: flex;
    gap: var(--spacing-lg);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gold-primary);
    font-family: 'Playfair Display', serif;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Game Selection Screen */
.game-selection {
    animation: fadeIn 0.5s ease-out;
}

.hero-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.game-card {
    background: var(--gradient-card);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-gold);
}

.game-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.game-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.game-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.game-tag {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Game Screen */
.game-screen {
    animation: slideIn 0.4s ease-out;
}

.game-screen.hidden {
    display: none;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.game-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--gold-primary);
}

.game-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.back-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-primary);
}

/* Betting Area */
.betting-area {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
    margin-bottom: var(--spacing-lg);
}

.betting-area h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--gold-primary);
}

.bet-chips {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.chip {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2), transparent);
}

.chip:nth-child(1) {
    background-color: #DC2626;
    border-color: #991B1B;
    color: white;
}

.chip:nth-child(2) {
    background-color: #2563EB;
    border-color: #1E40AF;
    color: white;
}

.chip:nth-child(3) {
    background-color: #059669;
    border-color: #047857;
    color: white;
}

.chip:nth-child(4) {
    background-color: #7C3AED;
    border-color: #5B21B6;
    color: white;
}

.chip:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.chip:active {
    transform: scale(0.95);
}

.current-bet {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.current-bet span {
    color: var(--gold-primary);
    font-weight: 600;
    font-family: 'Playfair Display', serif;
}

.deal-btn {
    background: var(--gradient-gold);
    color: var(--bg-primary);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.deal-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.deal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Game Table */
.game-table {
    background: linear-gradient(180deg, #0D3B2E 0%, #0A2E24 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
}

.game-table.hidden {
    display: none;
}

.dealer-area, .player-area {
    margin-bottom: var(--spacing-lg);
}

.dealer-area h4, .player-area h4 {
    font-family: 'Cinzel', serif;
    color: var(--gold-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.score {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.card-container {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    min-height: 120px;
}

/* Playing Cards */
.card {
    width: 90px;
    height: 130px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    box-shadow: var(--shadow-md);
    animation: dealCard 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    pointer-events: none;
}

.card.red {
    color: var(--red-suit);
}

.card.black {
    color: var(--black-suit);
}

.card-back {
    width: 90px;
    height: 130px;
    background: linear-gradient(135deg, #1E3A5F 0%, #0D2137 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold-primary);
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-md);
}

.card-top {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1;
}

.card-center {
    font-size: 2.5rem;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card-bottom {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1;
    transform: rotate(180deg);
    text-align: right;
}

/* Game Message */
.game-message {
    text-align: center;
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    font-size: 1.25rem;
    font-weight: 600;
    min-height: 50px;
}

.game-message.win {
    color: #10B981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.game-message.lose {
    color: #EF4444;
}

.game-message.push {
    color: var(--gold-primary);
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.game-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hit-btn {
    background: #10B981;
    color: white;
}

.hit-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.stand-btn {
    background: #EF4444;
    color: white;
}

.stand-btn:hover {
    background: #DC2626;
    transform: translateY(-2px);
}

.double-btn {
    background: #F59E0B;
    color: white;
}

.double-btn:hover {
    background: #D97706;
    transform: translateY(-2px);
}

/* Teen Patti Specific */
.teenpatti-layout {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.opponent-area {
    text-align: center;
}

.opponent-area h4 {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.pot-area {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
}

.pot {
    font-size: 1.5rem;
    color: var(--gold-primary);
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.teenpatti-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.chal-btn {
    background: #10B981;
    color: white;
}

.seen-btn {
    background: #3B82F6;
    color: white;
}

.pack-btn {
    background: #6B7280;
    color: white;
}

.show-btn {
    background: var(--gradient-gold);
    color: var(--bg-primary);
    grid-column: span 2;
}

/* Solitaire Specific */
.solitaire-table {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.solitaire-top {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    flex-wrap: wrap;
}

.stock-pile, .waste-pile {
    width: 90px;
    height: 130px;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
}

.stock-pile {
    background: linear-gradient(135deg, #1E3A5F 0%, #0D2137 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stock-pile:hover {
    box-shadow: var(--shadow-gold);
}

.waste-pile {
    border: 2px dashed rgba(212, 175, 55, 0.3);
}

.foundations {
    display: flex;
    gap: var(--spacing-sm);
    margin-left: auto;
}

.foundation {
    width: 90px;
    height: 130px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(212, 175, 55, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.foundation:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.foundation.has-cards {
    background: white;
    color: var(--red-suit);
}

.solitaire-tableau {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-sm);
    min-height: 400px;
}

.tableau-column {
    min-height: 130px;
    position: relative;
}

.tableau-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 130px;
    border: 2px dashed rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
}

.tableau-card {
    position: absolute;
    width: 90px;
    height: 130px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tableau-card:hover {
    transform: translateY(-5px);
    z-index: 10;
}

.tableau-card.face-down {
    background: linear-gradient(135deg, #1E3A5F 0%, #0D2137 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
}

.solitaire-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

/* Hi-Lo Specific */
.hilo-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.hilo-card-display {
    margin-bottom: var(--spacing-xl);
}

.card-placeholder {
    width: 150px;
    height: 210px;
    background: var(--gradient-card);
    border: 3px dashed rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--gold-primary);
    margin: 0 auto;
}

.hilo-prediction {
    margin-bottom: var(--spacing-xl);
}

.hilo-prediction p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.hilo-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hilo-btn {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
}

.high-btn {
    background: #10B981;
    color: white;
}

.high-btn:hover {
    background: #059669;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.low-btn {
    background: #EF4444;
    color: white;
}

.low-btn:hover {
    background: #DC2626;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.equal-btn {
    background: #F59E0B;
    color: white;
}

.equal-btn:hover {
    background: #D97706;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.hilo-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.hilo-streak, .hilo-score {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hilo-streak span, .hilo-score span {
    color: var(--gold-primary);
    font-weight: 600;
    font-family: 'Playfair Display', serif;
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dealCard {
    from {
        opacity: 0;
        transform: translateY(-50px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .card, .card-back {
        width: 70px;
        height: 100px;
    }
    
    .card-center {
        font-size: 1.8rem;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .game-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .solitaire-tableau {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .bet-chips {
        gap: var(--spacing-sm);
    }
    
    .chip {
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .user-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .card, .card-back {
        width: 55px;
        height: 80px;
    }
    
    .card-top, .card-bottom {
        font-size: 0.8rem;
    }
    
    .card-center {
        font-size: 1.4rem;
    }
}