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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

/* Login Page Styles */
.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    margin: 100px auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo img {
    max-width: 150px;
    margin-bottom: 20px;
}

.logo h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #ff4444;
    color: white;
    padding: 10px 20px;
    width: auto;
}

.btn-secondary:hover {
    background: #cc0000;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #c62828;
}

.info-box {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 25px;
    text-align: center;
}

.info-box p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.info-box strong {
    color: #333;
}

/* Header Styles */
.header {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

.header h1 {
    color: #333;
    font-size: 24px;
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

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

.username {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.balance {
    color: #666;
    font-size: 14px;
}

.balance strong {
    color: #27ae60;
    font-size: 18px;
}

/* Lobby Content */
.lobby-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.welcome-banner {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 30px;
}

.welcome-banner h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.welcome-banner p {
    font-size: 16px;
    opacity: 0.9;
}

/* Rooms Grid */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.room-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.room-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.room-card:hover::before {
    transform: scaleX(1);
}

.room-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.room-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.room-card.disabled:hover {
    transform: none;
    border-color: #e0e0e0;
    box-shadow: none;
}

.room-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.room-level {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.room-level.low {
    background: #e8f5e9;
    color: #2e7d32;
}

.room-level.medium {
    background: #fff3e0;
    color: #e65100;
}

.room-level.high {
    background: #fce4ec;
    color: #c2185b;
}

.room-level.vip {
    background: #f3e5f5;
    color: #7b1fa2;
}

.room-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.room-bet {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.room-bet strong {
    color: #333;
    font-size: 18px;
}

.btn-play {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-play:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.locked-message {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

/* Game Rules */
.game-rules {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
}

.game-rules h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.game-rules ul {
    list-style: none;
    padding: 0;
}

.game-rules li {
    padding: 10px 0;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
}

.game-rules li:last-child {
    border-bottom: none;
}

.game-rules li::before {
    content: '✓ ';
    color: #27ae60;
    font-weight: bold;
    margin-right: 10px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner-large {
    font-size: 48px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-body {
    text-align: center;
    padding: 20px 0;
}

.modal-body h2 {
    color: #333;
    margin-bottom: 15px;
}

.modal-body p {
    color: #666;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        margin: 20px auto;
        padding: 30px 20px;
    }
}

/* Success Message */
.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #2e7d32;
}

