/* Base y Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
    color: white;
    padding: 32px 24px;
    text-align: center;
}

.title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Main Content */
.main {
    padding: 0;
}

/* Auth Sections */
.auth-section {
    padding: 40px 24px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-section.hidden {
    display: none;
}

/* Auth Card */
.auth-card {
    width: 100%;
    text-align: center;
    max-width: 320px;
}

.welcome-text {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Botones */
.login-btn, .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    margin-bottom: 16px;
}

.login-btn {
    background: white;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

.login-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn.primary {
    background: #3182ce;
    color: white;
    border: 1px solid #3182ce;
}

.action-btn.primary:hover {
    background: #2b6cb0;
    border-color: #2b6cb0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.action-btn.secondary {
    background: white;
    color: #718096;
    border: 1px solid #e2e8f0;
}

.action-btn.secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #4a5568;
}

.google-icon {
    width: 18px;
    height: 18px;
}

.btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Demo Info */
.demo-info {
    margin-top: 24px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.demo-text {
    font-size: 12px;
    color: #718096;
    margin-bottom: 4px;
}

.demo-email {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #edf2f7;
    padding: 4px 8px;
    border-radius: 4px;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    display: inline-block;
}

/* User Section */
.user-header {
    text-align: center;
    margin-bottom: 24px;
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    color: white;
    font-weight: 600;
}

.user-greeting {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.user-email {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
    word-break: break-all;
}

.user-details {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Loading Section */
.loading-container {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 14px;
    color: #718096;
}

/* Error Section */
.error-card {
    text-align: center;
    padding: 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.error-message {
    font-size: 14px;
    color: #718096;
    margin-bottom: 24px;
    line-height: 1.4;
}

.retry-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.retry-btn:hover {
    background: #2b6cb0;
}

/* Footer */
.footer {
    background: #f7fafc;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.footer p {
    font-size: 12px;
    color: #718096;
    margin: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        margin: 10px;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .header {
        padding: 24px 20px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .auth-section {
        padding: 32px 20px;
    }
    
    .user-details {
        padding: 12px;
    }
    
    .detail-item {
        padding: 6px 0;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 450px;
        margin: 40px auto;
    }
    
    .auth-section {
        padding: 48px 32px;
    }
    
    .action-buttons {
        flex-direction: row;
    }
    
    .action-btn {
        flex: 1;
        margin-bottom: 0;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-section:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

/* Toast para mensajes */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}