:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    width: 100%;
    max-width: 500px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
}

.logo p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.mesa-info {
    font-size: 1rem !important;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
    font-weight: 500 !important;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    color: #1e293b;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon {
    font-size: 1.2rem;
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: white;
    color: #1e293b;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.tipo-options {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.tipo-option {
    position: relative;
    cursor: pointer;
}

.tipo-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.tipo-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tipo-option input[type="radio"]:checked + .tipo-label {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tipo-option:hover .tipo-label {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.tipo-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tipo-text {
    font-weight: 500;
    color: #1e293b;
    font-size: 1rem;
}

.tipo-option input[type="radio"]:checked + .tipo-label .tipo-text {
    color: var(--primary-color);
    font-weight: 600;
}

.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mensaje {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid var(--success-color);
}

.mensaje.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid var(--danger-color);
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* Responsive - Móviles */
@media (max-width: 600px) {
    body {
        padding: 15px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .container {
        max-width: 100%;
    }
    
    .logo h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .logo p {
        font-size: 1rem;
    }
    
    .mesa-info {
        font-size: 0.9rem !important;
        padding: 4px 12px !important;
        margin-top: 8px !important;
    }
    
    .card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .card-header h2 {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .form-group {
        gap: 6px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 16px;
        font-size: 16px; /* Previene zoom en iOS */
        border-radius: 10px;
    }
    
    .btn {
        padding: 18px 24px;
        font-size: 1rem;
        min-height: 50px; /* Tamaño táctil cómodo */
        touch-action: manipulation;
    }
    
    .footer {
        margin-top: 20px;
        font-size: 0.85rem;
    }
}

/* Móviles muy pequeños */
@media (max-width: 375px) {
    body {
        padding: 10px;
        padding-top: 15px;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .card {
        padding: 18px;
    }
    
    .card-header h2 {
        font-size: 1.3rem;
    }
    
    .form-group input {
        padding: 14px;
    }
    
    .btn {
        padding: 16px 20px;
    }
}

/* Optimización para orientación landscape en móviles */
@media (max-width: 600px) and (orientation: landscape) {
    body {
        padding-top: 10px;
        align-items: center;
    }
    
    .container {
        max-width: 90%;
    }
    
    .logo h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .card {
        padding: 15px 20px;
    }
    
    .footer {
        margin-top: 15px;
        font-size: 0.8rem;
    }
}

/* Mejoras táctiles */
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
    
    .form-group input:focus {
        transform: none; /* Sin animación en móviles táctiles */
    }
}

