

/* Step Container Management */
.step-container {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.step-container.active {
    display: block;
}

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

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 100%;
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.auth-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
}

.auth-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Form Styles */
form {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

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

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #ff6b6b;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Code Input Special Styling */
#code {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

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

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-link {
    background: none;
    color: #667eea;
    text-decoration: underline;
    font-size: 14px;
    padding: 8px;
}

.btn-link:hover {
    opacity: 0.8;
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Messages */
.message-container {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    animation: slideDown 0.3s ease;
}

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

.message-container.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-container.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-container.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Info and Success Text */
.info-text {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
}

.info-text strong {
    color: #667eea;
}

.success-text {
    text-align: center;
    color: #28a745;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 15px;
    background: #d4edda;
    border-radius: 8px;
}

/* Resend Container */
.resend-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.resend-container p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

/* Success Message (Step 4) */
.success-message {
    padding: 40px 30px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    font-size: 48px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-message h2 {
    color: #333;
    margin: 0 0 10px 0;
}

.success-message p {
    color: #666;
    margin: 0 0 30px 0;
}

/* Footer */
.auth-footer {
    padding: 20px 30px;
    text-align: center;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

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

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

/* Responsive Design */
@media (max-width: 480px) {
    .auth-card {
        margin: 10px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    form {
        padding: 20px;
    }
    
    #code {
        font-size: 20px;
        letter-spacing: 5px;
    }
}

/* Override for Random Writes theme */
.auth-card-wrapper {
    max-width: 650px;
    margin: 0 auto;
}

.auth-form {
    background: #111;
    border-radius: 15px;
    padding: 40px 30px;
    border: 2px solid #333;
}

.auth-form h1 {
    color: yellow;
    text-shadow: #fc0 1px 0 10px;
    text-align: center;
    margin-bottom: 30px;
}

.submit-btn {
    background: linear-gradient(135deg, yellow 0%, #ffd700 100%) !important;
    color: black !important;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

.submit-btn:hover {
    box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid yellow;
    color: yellow;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: yellow;
    color: black;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    font-size: 48px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.message-container.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.message-container.error {
    background: rgba(255, 85, 85, 0.2);
    color: #ff5555;
    border: 2px solid #ff5555;
}