/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 480px;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    min-height: 90vh;
}

/* Pantallas */
.screen {
    width: 100%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Encabezados */
.header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
}

.header h2 {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 1.5rem;
}

.back-btn {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #eaeaea;
}

.logout-btn {
    background: #ff6b6b;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #ff5252;
}

/* Logo y título */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2.5rem;
}

.app-title {
    font-weight: 700;
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.app-subtitle {
    color: #666;
    font-size: 1rem;
}

/* Formularios */
.form-container {
    width: 100%;
}

.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #444;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Botones */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    margin-top: 10px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(102, 126, 234, 0.2);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

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

.btn-trophy {
    background: linear-gradient(135deg, #ff00ff 0%, #00ffff 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    transition: all 0.3s ease;
}

.btn-trophy:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #ff5252;
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    color: #666;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Contenedor QR */
.qr-container {
    text-align: center;
    padding: 20px 0;
}

.qr-info {
    margin-bottom: 25px;
}

.qr-info p {
    color: #666;
    margin-bottom: 8px;
}

.qr-identifier {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 10px;
    display: inline-block;
    margin: 10px 0;
}

.qr-code {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.qr-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

/* Perfil */
.profile-container {
    width: 100%;
}

.user-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.user-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 3.5rem;
}

.user-info h3 {
    font-weight: 600;
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.user-info p {
    color: #666;
}

.profile-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.profile-data {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 20px;
}

.data-section {
    margin-bottom: 25px;
}

.data-section:last-child {
    margin-bottom: 0;
}

.data-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #444;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.data-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.data-item:last-child {
    border-bottom: none;
}

.data-label {
    font-weight: 500;
    color: #666;
}

.data-value {
    font-weight: 600;
    color: #333;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* Escaneo QR */
.scan-container {
    width: 100%;
}

.scan-info {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
}

.camera-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 25px;
}

#camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 2px solid transparent;
}

.frame-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: #667eea;
    border-width: 4px;
}

.frame-corner.top-left {
    top: 0;
    left: 0;
    border-top-style: solid;
    border-left-style: solid;
    border-top-left-radius: 10px;
}

.frame-corner.top-right {
    top: 0;
    right: 0;
    border-top-style: solid;
    border-right-style: solid;
    border-top-right-radius: 10px;
}

.frame-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-bottom-style: solid;
    border-left-style: solid;
    border-bottom-left-radius: 10px;
}

.frame-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-bottom-style: solid;
    border-right-style: solid;
    border-bottom-right-radius: 10px;
}

.scan-result {
    background: #e8f5e9;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.scan-result h4 {
    color: #2e7d32;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qr-content {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-family: monospace;
    font-size: 1.1rem;
    word-break: break-all;
    border: 1px solid #c8e6c9;
}

.scan-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Sistema de Alertas */
#alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 320px;
}

.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
    transform-origin: top right;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.alert-message {
    font-size: 0.9rem;
}

.alert-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.alert-close:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        border-radius: 15px;
        min-height: 95vh;
    }
    
    .screen {
        padding: 20px;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .camera-container {
        height: 250px;
    }
    
    .scan-frame {
        width: 180px;
        height: 180px;
    }
}

@media (max-height: 700px) {
    .logo-container {
        margin-bottom: 20px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
}
/* En tu archivo styles.css */
.data-section:last-child {
    border-bottom: none;
}

.data-item .data-label {
    font-weight: 600;
    color: #2d3748;
}

.data-item .data-value {
    font-weight: 700;
    color: #2b6cb0;
    font-size: 1.1em;
}

/* Estilo específico para créditos */
#profile-credits {
    color: #2f855a;
}
/* Estilos para campos de contraseña */
.password-input {
    position: relative;
}

.password-input input {
    padding-right: 40px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 5px;
}

.toggle-password:hover {
    color: #4a5568;
}

.password-requirements {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #718096;
}

.password-strength {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-weak {
    background-color: #e53e3e;
}

.strength-medium {
    background-color: #d69e2e;
}

.strength-strong {
    background-color: #38a169;
}
.text-weak { color: #e53e3e; }
.text-medium { color: #d69e2e; }
.text-strong { color: #38a169; }

.strength-text {
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
}
.scanned-content {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.code-box {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
    font-family: monospace;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 0;
}