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

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    height: 100vh;
}

/* Background Styles */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/horse-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: zoomEffect 20s ease-in-out infinite;
}

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

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(105, 14, 14, 0.85) 0%, 
        rgba(62, 61, 57, 0.9) 100%);
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: #d1b57c;
    border-radius: 50%;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(209, 181, 124, 0.3);
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(209, 181, 124, 0.1), transparent);
    animation: shine 3s infinite;
}

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

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 5rem;
    margin-bottom: 15px;
    animation: bounce 3s infinite, glow 2s infinite alternate;
    display: inline-block;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-15px) scale(1.1); }
    60% { transform: translateY(-7px) scale(1.05); }
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px rgba(209, 181, 124, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(209, 181, 124, 0.8)); }
}

.logo-section h1 {
    font-family: 'Playfair Display', serif;
    color: #690e0e;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.description {
    color: #3e3d39;
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Form Styles */
.form {
    width: 100%;
}

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

.input-container {
    position: relative;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 20px 45px 15px 15px;
    border: 2px solid rgba(209, 181, 124, 0.5);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    color: #3e3d39;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #690e0e;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(105, 14, 14, 0.1);
}

.input-label {
    position: absolute;
    top: 18px;
    left: 15px;
    font-size: 16px;
    color: #3e3d39;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 5px;
}

.form-group input:focus ~ .input-label,
.form-group input:not(:placeholder-shown) ~ .input-label,
.form-group select:focus ~ .input-label,
.form-group select:valid ~ .input-label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #690e0e;
    font-weight: 600;
    background: white;
}

.select-label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #690e0e;
    font-weight: 600;
    background: white;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #d1b57c;
    transition: all 0.3s ease;
}

.form-group input:focus ~ .input-icon,
.form-group select:focus ~ .input-icon {
    color: #690e0e;
    transform: translateY(-50%) scale(1.2);
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #690e0e, #d1b57c);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.form-group input:focus ~ .focus-border,
.form-group select:focus ~ .focus-border {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Button Styles */
.login-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #690e0e, #8b1a1a);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 30px rgba(105, 14, 14, 0.4),
        0 0 0 1px rgba(209, 181, 124, 0.3);
    background: linear-gradient(135deg, #8b1a1a, #a52a2a);
}

.login-btn:active {
    transform: translateY(-1px);
}

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

.login-btn:hover .btn-shine {
    left: 100%;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    display: block;
}

/* Links Section */
.links {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(209, 181, 124, 0.3);
}

.link {
    color: #690e0e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.link:hover {
    color: #8b1a1a;
    transform: translateY(-2px);
}

.link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #690e0e, #d1b57c);
    transition: width 0.3s ease;
}

.link:hover::after {
    width: 100%;
}

/* Alert Styles */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

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

.alert-error {
    background: linear-gradient(135deg, #fee, #fdd);
    border: 1px solid #fcc;
    color: #c00;
    box-shadow: 0 5px 15px rgba(204, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #efe, #dfd);
    border: 1px solid #cfc;
    color: #060;
    box-shadow: 0 5px 15px rgba(0, 102, 0, 0.1);
}

.alert-icon {
    font-size: 16px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(209, 181, 124, 0.3);
}

.scale-animation {
    animation: scaleIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #3e3d39;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #690e0e;
    background: rgba(105, 14, 14, 0.1);
    transform: rotate(90deg);
}

.modal-icon {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.modal-content h2 {
    color: #690e0e;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    text-align: center;
    font-size: 1.8rem;
}

.modal-content p {
    color: #3e3d39;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: center;
    font-size: 0.95rem;
}

.modal-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #690e0e, #8b1a1a);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(105, 14, 14, 0.3);
    background: linear-gradient(135deg, #8b1a1a, #a52a2a);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-form {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .links {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 30px 25px;
        width: 95%;
    }
    
    .logo {
        font-size: 4rem;
    }
    
    .logo-section h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 25px 20px;
    }
    
    .modal-content {
        padding: 25px 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 18px 40px 13px 12px;
    }
}