/* ================================================================
   WARFALLEN - REGISTRATION PAGE
   Rise Through Conquest - Dark Fantasy Medieval Strategy MMO
   ================================================================ */

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@700;900&family=Roboto:wght@300;400;500;700&display=swap');

/* ================================================================
   CSS VARIABLES
   ================================================================ */
:root {
    /* Colors */
    --color-black: #0a0a0a;
    --color-charcoal: #1a1a1a;
    --color-dark: #2b2b2b;
    --color-gold: #d4af37;
    --color-antique-gold: #c9a227;
    --color-brass: #b08d57;
    --color-crimson: #dc143c;
    --color-blood: #8b0000;
    --color-steel: #3d5a80;

    /* Text */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6b6b6b;
    --text-white: #ffffff;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Shadows */
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.9), 0 4px 6px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.95), 0 10px 10px rgba(0, 0, 0, 0.8);

    /* Glows */
    --glow-gold: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
    --glow-red: 0 0 10px rgba(220, 20, 60, 0.5), 0 0 20px rgba(220, 20, 60, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

/* ================================================================
   BASE STYLES
   ================================================================ */
body, html {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: var(--color-black) url('images/Register_Background.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    position: relative;
}

/* Dark vignette overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Noise texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence baseFrequency="0.9"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.05"/></svg>');
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* ================================================================
   REGISTER CONTAINER
   ================================================================ */
.register-container {
    width: 100%;
    max-width: 450px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-xl), var(--glow-gold);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

/* Ornate corner decorations */
.register-container::before,
.register-container::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(212, 175, 55, 0.5);
}

.register-container::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: var(--radius-xl);
}

.register-container::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: var(--radius-xl);
}

/* Stone texture overlay */
.register-container .register-form {
    position: relative;
}

.register-container .register-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -40px;
    right: -40px;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
    border-radius: var(--radius-xl);
    pointer-events: none;
    z-index: -1;
}

/* ================================================================
   FORM HEADER
   ================================================================ */
.register-form h1 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: var(--space-xl);
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 50%, #b08d57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    letter-spacing: 2px;
    position: relative;
}

.register-form h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, transparent 100%);
}

/* ================================================================
   FORM GROUPS
   ================================================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-gold);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(10, 10, 10, 0.8);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    margin-top: var(--space-xs);
    transition: all var(--transition-base);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2),
                inset 0 1px 3px rgba(0, 0, 0, 0.5);
    background: rgba(10, 10, 10, 0.95);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
    font-style: italic;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn.register-btn {
    width: 100%;
    padding: 14px 24px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 100%);
    color: var(--color-black);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: var(--shadow-md), var(--glow-gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-top: var(--space-md);
}

.btn.register-btn:hover {
    background: linear-gradient(135deg, var(--color-antique-gold) 0%, var(--color-gold) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-gold);
}

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

/* ================================================================
   LOGIN LINK
   ================================================================ */
.login-link {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.login-link p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.login-link a {
    color: var(--color-steel);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
    border-bottom: 1px solid transparent;
}

.login-link a:hover {
    color: var(--color-gold);
    border-bottom-color: var(--color-gold);
}

/* ================================================================
   ERROR MESSAGES
   ================================================================ */
.error-message {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.2), rgba(220, 20, 60, 0.1));
    border-left: 4px solid var(--color-crimson);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-md), var(--glow-red);
    animation: slideIn 0.3s ease-out;
}

.error-message p {
    color: var(--color-crimson);
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
}

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

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 768px) {
    body {
        padding: var(--space-md);
    }

    .register-container {
        padding: var(--space-xl) var(--space-lg);
    }

    .register-form h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .btn.register-btn {
        font-size: 1rem;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .register-container {
        padding: var(--space-lg) var(--space-md);
    }

    .register-form h1 {
        font-size: 1.75rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
}

/* ================================================================
   ACCESSIBILITY
   ================================================================ */
*:focus {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* ================================================================
   ADDITIONAL ENHANCEMENTS
   ================================================================ */

/* Terms checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: var(--space-sm);
    margin-top: 3px;
    accent-color: var(--color-gold);
}

.checkbox-group label {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.checkbox-group label a {
    color: var(--color-steel);
    text-decoration: underline;
}

.checkbox-group label a:hover {
    color: var(--color-gold);
}

/* Loading state */
.btn.register-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Password strength indicator (future enhancement) */
.password-strength {
    margin-top: var(--space-xs);
    height: 4px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--color-crimson);
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--color-brass);
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--color-gold);
}

/* ================================================================
   END OF REGISTRATION PAGE STYLES
   ================================================================ */
