/* Auth Pages - Epic RPG Style */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
    --bg-ink: #0f0b07;
    --bg-ember: #1a120a;
    --bg-ash: #241911;
    --gold: #e0b26a;
    --gold-strong: #f2c777;
    --gold-dark: #b8860b;
    --text-light: #f0eadf;
    --text-muted: #c9b7a0;
    --border-gold: rgba(224, 178, 106, 0.18);
    --shadow-gold: rgba(224, 178, 106, 0.15);
    --card-top: rgba(34, 24, 16, 0.92);
    --card-bot: rgba(16, 12, 9, 0.92);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
    background: 
        linear-gradient(135deg, rgba(15, 11, 7, 0.92) 0%, rgba(26, 18, 10, 0.88) 50%, rgba(36, 25, 17, 0.92) 100%),
        url('/game/assets/webg.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated background particles */
body.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(224, 178, 106, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(242, 199, 119, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 69, 19, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

/* Floating particles animation */
body.auth-page::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='1' fill='%23e0b26a' opacity='0.1'/%3E%3C/svg%3E");
    background-size: 50px 50px;
    opacity: 0.3;
    animation: sparkle 20s linear infinite;
    pointer-events: none;
}

@keyframes sparkle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50px); }
}

/* Main container */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card with ornate border */
.auth-card {
    background: linear-gradient(180deg, rgba(34, 24, 16, 0.95) 0%, rgba(16, 12, 9, 0.95) 100%) !important;
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    padding: 40px 35px;
    position: relative;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(224, 178, 106, 0.05),
        inset 0 1px 0 rgba(255, 230, 170, 0.06);
    overflow: hidden;
}

/* Stone texture overlay */
.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/game/assets/panel/panel_stone.png');
    background-repeat: repeat;
    background-size: 360px 360px;
    opacity: 0.25;
    filter: contrast(1.08) saturated(1.06);
    pointer-events: none;
    z-index: 0;
}

/* Corner ornaments */
.auth-card::after {
    content: '◆';
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 12px;
    color: rgba(224, 178, 106, 0.4);
    z-index: 1;
}

.auth-card > * {
    position: relative;
    z-index: 2;
}

/* Logo area */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo-img {
    display: block;
    max-height: 80px;
    max-width: 200px;
    width: auto;
    height: auto;
    margin: 0 auto 15px auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
    object-fit: contain;
}

.auth-logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--gold-strong) 0%, #ff9500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 25px rgba(255, 183, 77, 0.3),
        0 0 40px rgba(255, 200, 100, 0.15);
}

.auth-logo-icon svg {
    width: 36px;
    height: 36px;
    fill: #1a1a1a;
}

.auth-title {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-strong);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Form styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    padding-left: 45px;
    background: rgba(18, 12, 8, 0.65);
    border: 1px solid rgba(224, 178, 106, 0.20);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: #8a7560;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 200, 100, 0.5);
    background: rgba(26, 18, 10, 0.9);
    box-shadow: 
        0 0 0 3px rgba(255, 183, 77, 0.1),
        0 0 20px rgba(255, 183, 77, 0.08);
}

.form-group .input-icon {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 20px;
    height: 20px;
    color: #8a7560;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-group input:focus + .input-icon,
.form-group input:not(:placeholder-shown) + .input-icon {
    color: var(--gold-strong);
}

/* With label adjustment */
.form-group.has-label .input-icon {
    top: calc(50% + 12px);
}

/* Submit button */
.auth-button {
    width: 100%;
    padding: 16px 24px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--gold-strong) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    border: none;
    border-radius: 10px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(255, 183, 77, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(255, 183, 77, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button::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;
}

.auth-button:hover::before {
    left: 100%;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #8a7560;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 117, 96, 0.3), transparent);
}

.auth-divider span {
    padding: 0 15px;
}

/* Footer link */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(139, 117, 96, 0.15);
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 14px;
}

.auth-footer a {
    color: var(--gold-strong);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--gold-strong);
    text-shadow: 0 0 10px rgba(255, 200, 100, 0.3);
}

/* Error/Success messages */
.auth-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-message.error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f8d7da;
}

.auth-message.success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #d4edda;
}

/* Game branding */
.game-brand {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
}

.game-brand span {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: #8a7560;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Remember me checkbox */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold-strong);
}

.forgot-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--gold-strong);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 25px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .form-group input {
        padding: 12px 14px;
        padding-left: 42px;
    }
}


