/* Shared Styles for Thronmenders Auth Pages - Royal Theme */

/* Root Variables for Consistent Theming */
:root {
    --royal-gold: #FFD700;
    --royal-purple: #663399;
    --royal-blue: #4169E1;
    --royal-deep: #2F1B69;
    --royal-dark: #1A0F2E;
    --neon-green: #00FFAB;
    --neon-blue: #1E90FF;
    --dark-bg: #0A0612;
}

/* Common Animations */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 0% 50%; }
    100% { background-position: 50% 0%; }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Base Body Styling */
body {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--royal-dark) 15%, var(--royal-deep) 25%, #4C2C85 45%, #6B46C1 65%, #553C9A 85%, var(--dark-bg) 100%);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: gradient 15s ease infinite;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Content Styling */
main {
    animation: fadeInUp 0.6s ease-out;
}

/* Header Styling */
#header {
    background: rgba(26, 15, 46, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

/* Logo Styling */
.neon-text-gold {
    color: var(--royal-gold);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* Glassmorphism Effect */
.glassmorphism {
    background: rgba(10, 6, 18, 0.35);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(147, 51, 234, 0.3);
    box-shadow: 0 8px 32px 0 rgba(107, 70, 193, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.glassmorphism:hover {
    box-shadow: 0 12px 32px 0 rgba(147, 51, 234, 0.4);
    transform: translateY(-2px);
}

/* Navigation Links */
.nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #A855F7;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Form Input Styling */
input[type="text"],
input[type="email"],
input[type="password"] {
    background: rgba(26, 15, 46, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    font-family: 'Sora', sans-serif;
    transition: all 0.3s ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 171, 0.3);
    background: rgba(26, 15, 46, 0.8);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Labels */
label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

/* Primary Button Styling */
button[type="submit"] {
    background: linear-gradient(135deg, var(--neon-green) 0%, #00CC88 100%);
    color: black;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(0, 255, 171, 0.3);
    width: 100%;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 255, 171, 0.4);
    background: linear-gradient(135deg, #00E6B8 0%, #00B377 100%);
}

button[type="submit"]::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;
}

button[type="submit"]:hover::before {
    left: 100%;
}

/* Link Styling */
a {
    color: var(--royal-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--neon-blue);
    text-decoration: underline;
}

/* Page Titles */
h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* Subtitles */
p.text-gray-400 {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Footer Styling */
footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    color: rgba(255, 255, 255, 0.6);
}

footer a:hover {
    color: white;
}

.footer-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.footer-link:hover {
    transform: translateX(4px);
}

.footer-link i {
    transition: transform 0.3s ease;
}

.footer-link:hover i {
    transform: scale(1.2);
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out calc(0.3s + var(--delay, 0s)) both;
}

/* Mobile Menu */
#mobile-menu {
    background: rgba(26, 15, 46, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.hidden {
    display: none;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
}

.mobile-nav-link:hover {
    background-color: rgba(147, 51, 234, 0.15);
    color: #fff;
    border-left-color: #A855F7;
}

/* Loading States */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

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

/* Error and Success States */
.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3) !important;
}

.success {
    border-color: var(--neon-green) !important;
    box-shadow: 0 0 15px rgba(0, 255, 171, 0.3) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .glassmorphism {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body {
        animation: none;
        background-attachment: scroll;
    }
}

/* Focus States for Better Accessibility */
button:focus,
input:focus {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .glassmorphism {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid white;
    }
    
    input {
        background: black;
        border: 2px solid white;
    }
}
