/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    background: linear-gradient(135deg, #FF7262 0%, #FF5722 100%);
    color: white;
    padding: 32px 24px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

.content {
    padding: 40px 24px;
}

.state-container {
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.icon-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.icon-container.success svg {
    animation: checkmark 0.6s ease-out;
}

.icon-container.error svg {
    animation: shake 0.5s ease-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.state-container h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.state-container p {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 16px;
}

.primary-button {
    background: linear-gradient(135deg, #0073E6 0%, #005BB5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin: 16px 0;
    min-width: 200px;
    justify-content: center;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 115, 230, 0.3);
}

.primary-button:active {
    transform: translateY(0);
}

.secondary-button {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 16px 0;
}

.secondary-button:hover {
    background: #e9e9e9;
    border-color: #ccc;
}

.help-text {
    font-size: 14px;
    color: #888;
    margin-top: 16px;
}

.success-details {
    background: #f0f9f0;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    text-align: left;
}

.success-details p {
    font-size: 14px;
    color: #155724;
    margin: 4px 0;
    display: flex;
    align-items: center;
}

.footer {
    background: #f8f9fa;
    padding: 16px 24px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.version {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF7262;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 24px 20px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .content {
        padding: 32px 20px;
    }
    
    .state-container h2 {
        font-size: 20px;
    }
    
    .primary-button {
        width: 100%;
        padding: 14px 24px;
    }
}

/* Focus styles for accessibility */
button:focus {
    outline: 2px solid #0073E6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid #000;
    }
    
    .primary-button {
        background: #000;
        border: 2px solid #000;
    }
    
    .secondary-button {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .auth-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .header {
        background: #f5f5f5;
        color: #333;
    }
    
    button {
        display: none;
    }
}
