/* Auth Page Styles */
.auth-page {
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(5, 5, 5, 0.9) 50%, rgba(0, 0, 0, 0.95) 100%),
        url('../cover.png') center center / cover no-repeat;
    min-height: 100vh;
    padding: 80px 0 0;
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(139, 0, 0, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 0;
    animation: fantasyGlow 8s ease-in-out infinite alternate;
}

/* Floating particles effect */
.auth-page {
    background-attachment: fixed;
}

@keyframes fantasyGlow {
    0% {
        opacity: 0.8;
        filter: brightness(0.9);
    }
    100% {
        opacity: 1;
        filter: brightness(1.1);
    }
}

/* Magical sparkle effect */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
}

.auth-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.auth-container {
    max-width: 1000px;
    width: 100%;
    display: flex;
    gap: 30px;
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(5, 5, 5, 0.9) 50%, rgba(0, 0, 0, 0.85) 100%),
        radial-gradient(circle at top left, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at bottom right, rgba(139, 0, 0, 0.1) 0%, transparent 50%);
    backdrop-filter: blur(15px) saturate(1.2);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(255, 215, 0, 0.15);
    animation: fadeInUp 0.8s ease-out, containerGlow 4s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
}

@keyframes containerGlow {
    0% {
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.7),
            0 0 60px rgba(255, 215, 0, 0.15);
        border-color: rgba(255, 215, 0, 0.4);
    }
    100% {
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.7),
            0 0 80px rgba(255, 215, 0, 0.25);
        border-color: rgba(255, 215, 0, 0.6);
    }
}

.auth-container.auth-single {
    max-width: 500px;
    justify-content: center;
}

.auth-form-container {
    flex: 1;
}


@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.auth-form-container h2 {
    font-family: var(--font-thai);
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 25%, #d4af37 50%, #ffd700 75%, #ffed4e 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
    position: relative;
    animation: titleShine 3s ease-in-out infinite;
    z-index: 1;
    font-weight: 700;
}

@keyframes titleShine {
    0%, 100% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
    }
    50% {
        background-position: 100% 50%;
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 30px rgba(255, 215, 0, 0.5));
    }
}

.auth-form-container h2::before {
    content: '⚔';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.6;
    animation: sparkle 2s ease-in-out infinite;
}

.auth-form-container h2::after {
    content: '⚔';
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.6;
    animation: sparkle 2s ease-in-out infinite 1s;
}

.auth-form-container h2 .title-line {
    display: block;
    margin: 15px auto 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), var(--secondary-gold), var(--primary-gold), transparent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    animation: lineGlow 2s ease-in-out infinite;
}

@keyframes lineGlow {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.9);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e8d5a3;
    margin-bottom: 8px;
    font-family: var(--font-thai);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(5, 5, 5, 0.9) 100%),
        radial-gradient(circle at top left, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    color: var(--text-light);
    font-family: var(--font-thai);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.form-control::placeholder {
    color: #888;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(5, 5, 5, 0.95) 100%),
        radial-gradient(circle at top left, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    transform: translateY(-1px);
}

.gender-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    cursor: pointer;
    font-family: var(--font-thai);
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-gold);
}

.btn-auth {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: #000;
}

/* ปุ่มเหลือง (primary และ success) ให้ตัวหนังสือเป็นสีดำ */
.btn-auth.btn-primary,
.btn-auth.btn-success {
    color: #000 !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* ปุ่ม success (สีเขียว) ให้เป็นสีทองเหมือน primary */
.btn-success {
    background: linear-gradient(45deg, var(--secondary-gold), var(--primary-gold)) !important;
    color: #000 !important;
    border: none;
}

.btn-auth::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 ease;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    filter: brightness(1.1);
}

.forgot-password {
    text-align: center;
    margin-top: 15px;
}

.forgot-password a {
    color: var(--primary-gold);
    text-decoration: none;
    font-family: var(--font-thai);
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--secondary-gold);
    text-decoration: underline;
}

.register-link,
.login-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
    font-family: var(--font-thai);
}

.register-link a,
.login-link a {
    color: var(--primary-gold);
    text-decoration: none;
    margin-left: 5px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover,
.login-link a:hover {
    color: var(--secondary-gold);
    text-decoration: underline;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Magical decorative elements */
.auth-form-container::after {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: sparkle 3s ease-in-out infinite;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        padding: 20px;
    }
    
    .auth-form-container {
        padding: 20px;
    }
    
    .auth-form-container h2 {
        font-size: 1.5rem;
    }
    
    .auth-form-container h2::before,
    .auth-form-container h2::after {
        display: none;
    }
}

