* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

body::before {
    top: -50%; right: -20%; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
}

body::after {
    bottom: -30%; left: -10%; width: 80%; height: 80%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.08) 0%, transparent 70%);
    animation-direction: reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.container, .login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.container::before, .login-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #ffc107, #007bff);
    border-radius: 20px 20px 0 0;
}

.header, .login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h2, .login-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #007bff, #6c757d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p, .login-header p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

input, select {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus {
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.alert {
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(108, 117, 125, 0.1);
}

.footer a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
}

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

/* Login specific styles */
.login-container {
    max-width: 420px;
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-header h2 {
    margin-bottom: 0.5rem;
}

.form-group label {
    margin-bottom: 0.75rem;
}

input[type="text"], input[type="password"] {
    padding: 1rem 1rem 1rem 3rem;
}

.btn {
    margin-top: 1rem;
}

.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-left: 4px solid #ffc107;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    user-select: none;
    z-index: 2;
}

.password-toggle:hover {
    color: #007bff;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(108, 117, 125, 0.1);
}

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(0, 123, 255, 0.03);
    border: 1px solid rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.instructions {
    justify-content: left;
}


.footer-link:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.08);
    border-color: rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 1rem;
}


/* Confirmation specific styles */
.container {
    text-align: center;
}

.icon-success {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1.5rem;
    animation: scaleIn 0.5s ease-out;
}

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

.message {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    color: #155724;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-left: 4px solid #28a745;
}

.container::before {
    background: linear-gradient(90deg, #28a745, #007bff, #28a745);
}

.header h2 {
    background: linear-gradient(135deg, #28a745, #6c757d);
}

/* Responsive design */
@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }

    .login-header h2 {
        font-size: 1.75rem;
    }

    .footer-links {
        flex-direction: column;
    }
}