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

body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 50%, #F4A460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 2vw, 2rem);
}

/* Animated background elements */
.bg-decoration {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
}

.zodiac-symbol {
    position: absolute;
    font-size: clamp(60px, 12vw, 120px);
    color: #fff;
    animation: float 20s infinite ease-in-out;
}

.zodiac-symbol:nth-child(1) {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.zodiac-symbol:nth-child(2) {
    top: 70%;
    right: 20%;
    animation-delay: 5s;
}

.zodiac-symbol:nth-child(3) {
    bottom: 15%;
    left: 25%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

.login-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    max-width: 1100px;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-radius: clamp(15px, 3vw, 30px);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.left-panel {
    background: linear-gradient(135deg, #F4A460 0%, #FFE4B5 100%);
    padding: clamp(2rem, 5vw, 3.75rem) clamp(1.5rem, 4vw, 3.125rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: clamp(250px, 40vh, 400px);
}

.decorative-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(210, 105, 30, 0.2);
}

.circle-1 {
    width: clamp(150px, 30vw, 300px);
    height: clamp(150px, 30vw, 300px);
    top: clamp(-75px, -10vw, -100px);
    right: clamp(-75px, -10vw, -100px);
}

.circle-2 {
    width: clamp(100px, 20vw, 200px);
    height: clamp(100px, 20vw, 200px);
    bottom: clamp(-25px, -5vw, -50px);
    left: clamp(-25px, -5vw, -50px);
}

.welcome-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.mystical-icon {
    width: clamp(80px, 15vw, 150px);
    height: clamp(80px, 15vw, 150px);
    margin: 0 auto clamp(1rem, 3vw, 1.875rem);
    position: relative;
    animation: rotate 60s linear infinite;
}

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

.welcome-content h1 {
    font-size: clamp(1.75rem, 4vw, 2.625rem);
    color: #8B4513;
    margin-bottom: clamp(0.5rem, 1.5vw, 0.9375rem);
    font-weight: 400;
    font-style: italic;
}

.welcome-content p {
    font-size: clamp(0.9rem, 1.8vw, 1.125rem);
    color: #654321;
    line-height: 1.6;
    margin-bottom: clamp(0.5rem, 1vw, 0.625rem);
}

.divider {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 0.9375rem);
    margin: clamp(1rem, 2.5vw, 1.5625rem) 0;
}

.divider-line {
    width: clamp(30px, 6vw, 60px);
    height: 1px;
    background-color: #D2691E;
}

.divider-diamond {
    color: #D2691E;
    font-size: clamp(10px, 1.2vw, 12px);
}

.right-panel {
    padding: clamp(2rem, 5vw, 3.75rem) clamp(1.5rem, 4vw, 3.125rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.login-header h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    color: #2c2c2c;
    margin-bottom: clamp(0.5rem, 1vw, 0.625rem);
    font-weight: 400;
}

.login-header p {
    font-size: clamp(0.875rem, 1.6vw, 1rem);
    color: #666;
}

/* Django Messages */
.messages {
    margin-bottom: clamp(1rem, 2.5vw, 1.5625rem);
}

.alert {
    padding: clamp(0.75rem, 1.2vw, 0.9375rem);
    border-radius: clamp(6px, 1vw, 8px);
    margin-bottom: clamp(0.5rem, 1vw, 0.625rem);
    font-size: clamp(0.8rem, 1.4vw, 0.875rem);
    animation: slideIn 0.3s ease;
}

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

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

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

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

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

.form-group {
    margin-bottom: clamp(1rem, 2.5vw, 1.5625rem);
    position: relative;
}

.form-group label {
    display: block;
    font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
    color: #4a4a4a;
    margin-bottom: clamp(0.4rem, 0.8vw, 0.5rem);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: clamp(0.75rem, 1.5vw, 0.9375rem);
    top: 50%;
    transform: translateY(-50%);
    color: #D2691E;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    z-index: 1;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: clamp(0.75rem, 1.5vw, 0.9375rem) clamp(0.75rem, 1.5vw, 0.9375rem) clamp(0.75rem, 1.5vw, 0.9375rem) clamp(2.25rem, 4.5vw, 2.8125rem);
    border: 2px solid #FFE4B5;
    border-radius: clamp(8px, 1.2vw, 12px);
    font-size: clamp(0.875rem, 1.6vw, 1rem);
    font-family: inherit;
    transition: all 0.3s ease;
    background: #FFFAF0;
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #D2691E;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(210, 105, 30, 0.1);
}

/* Error states */
.form-group input.error,
.form-group input[type="email"]:invalid:not(:focus),
.form-group input[type="password"]:invalid:not(:focus) {
    border-color: #dc3545;
}

.error-message {
    margin-top: clamp(0.3rem, 0.6vw, 0.375rem);
    font-size: clamp(0.75rem, 1.3vw, 0.8125rem);
    color: #dc3545;
    display: block;
}

.error-message span {
    display: block;
    margin-bottom: clamp(0.15rem, 0.3vw, 0.1875rem);
}

.password-toggle {
    position: absolute;
    right: clamp(0.75rem, 1.5vw, 0.9375rem);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #D2691E;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    transition: color 0.3s;
    z-index: 1;
}

.password-toggle:hover {
    color: #8B4513;
}

.form-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.75rem, 1.5vw, 0.9375rem);
    margin-bottom: clamp(1.5rem, 3vw, 1.875rem);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 0.8vw, 0.5rem);
    font-size: clamp(0.8rem, 1.4vw, 0.875rem);
    color: #4a4a4a;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: clamp(16px, 1.8vw, 18px);
    height: clamp(16px, 1.8vw, 18px);
    cursor: pointer;
    accent-color: #D2691E;
}

.forgot-password {
    font-size: clamp(0.8rem, 1.4vw, 0.875rem);
    color: #D2691E;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #8B4513;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: clamp(0.875rem, 1.6vw, 1rem);
    background: linear-gradient(135deg, #D2691E 0%, #FF8C00 100%);
    color: white;
    border: none;
    border-radius: clamp(8px, 1.2vw, 12px);
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(210, 105, 30, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 1vw, 0.625rem);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(210, 105, 30, 0.4);
}

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

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.signup-link {
    text-align: center;
    margin-top: clamp(1.5rem, 3vw, 1.875rem);
    font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
    color: #666;
}

.signup-link a {
    color: #D2691E;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.signup-link a:hover {
    color: #8B4513;
    text-decoration: underline;
}