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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a365d 0%, #2d5a87 50%, #4a90a4 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Islamic Pattern Background */
.pattern-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

.auth-container {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    animation: slideInUp 0.8s ease-out;
    text-align: center;
}

.auth-header {
    margin-bottom: 40px;
}

.auth-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.3);
}

.auth-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 10px;
}

.mosque-name {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

.auth-form {
    margin: 40px 0;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    text-align: left;
}

.code-input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
}

.code-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.code-input::placeholder {
    color: #a0aec0;
    letter-spacing: 1px;
}

.submit-btn {
    width: 100%;
    padding: 18px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.back-link {
    margin-top: 30px;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-link a:hover {
    color: #5a67d8;
    transform: translateX(-3px);
}

.security-notice {
    background: rgba(255, 243, 205, 0.8);
    border: 1px solid rgba(237, 137, 54, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 25px 0;
    font-size: 0.85rem;
    color: #744210;
    line-height: 1.4;
}

.security-icon {
    display: inline-block;
    margin-right: 5px;
}

/* Error/Success states (for future JS functionality) */
.code-input.error {
    border-color: #e53e3e;
    animation: shake 0.5s ease-in-out;
}

.code-input.success {
    border-color: #38a169;
}

.error-message {
    color: #e53e3e;
    font-size: 0.8rem;
    margin-top: 8px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        padding: 40px 25px;
        margin: 10px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .code-input {
        padding: 16px 18px;
        font-size: 1rem;
    }

    .submit-btn {
        padding: 16px 18px;
        font-size: 1rem;
    }
}

/* Loading state */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

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