/* Casino Game - Main Stylesheet */
/* Mobile-first responsive design */

:root {
    --primary-color: #d4af37;
    --primary-dark: #b8941f;
    --secondary-color: #1a472a;
    --secondary-dark: #0f2819;
    --accent-color: #c41e3a;
    --bg-dark: #0a0e0d;
    --bg-card: #162820;
    --text-light: #f4f1ea;
    --text-muted: #a8a399;
    --success: #2ecc71;
    --error: #e74c3c;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary-dark) 100%);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(196, 30, 58, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
header {
    background: rgba(10, 14, 13, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '♠';
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-name {
    color: var(--text-light);
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-dark);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 175, 55, 0.4);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-info {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid #3498db;
    color: #3498db;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-online {
    background: var(--success);
    color: white;
}

.status-waiting {
    background: #f39c12;
    color: white;
}

.status-ready {
    background: #3498db;
    color: white;
}

.status-playing {
    background: var(--accent-color);
    color: white;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Responsive Design */

/* Tablets (768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logo {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 2rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .container {
        padding: 2rem;
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .logo {
        font-size: 2rem;
    }
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

/* Touch devices - larger tap targets */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .form-control {
        min-height: 48px;
        font-size: 16px; /* Prevents iOS zoom on input focus */
    }
}

/* Landscape mobile */
@media (max-width: 767px) and (orientation: landscape) {
    header {
        position: static;
    }
    
    .container {
        padding: 0.5rem;
    }
}