/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
}

.login-box h2 {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #667eea;
    outline: none;
}

/* Botones */
.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-join {
    width: 100%;
    text-align: center;
}

.btn-logout {
    color: #fff;
    background: #e53e3e;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    margin-left: 15px;
}

.btn-logout:hover {
    background: #c53030;
}

.btn-back {
    color: #667eea;
    text-decoration: none;
}

/* Header */
.main-header {
    background: #2d3748;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1 {
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
}

/* Tarjetas de salas */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.room-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.room-header {
    padding: 15px 20px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-header h3 {
    font-size: 1.1rem;
    color: #2d3748;
}

.room-body {
    padding: 20px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Admin */
.admin-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.form-create-room {
    max-width: 600px;
    margin: 0 auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        flex-direction: column;
    }
}