/**
 * Thronelord - Medieval Fantasy Game Website
 * Dark theme with premium game aesthetics
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-gold: #d4af37;
    --primary-gold-dark: #b8941f;
    --primary-gold-light: #f4e76b;
    --dark-bg: #0a0a0a;
    --dark-bg-secondary: #1a1a1a;
    --dark-bg-tertiary: #2a2a2a;
    --dark-border: #333;
    --text-light: #e0e0e0;
    --text-muted: #a0a0a0;
    --text-dark: #333;
    --accent-red: #8b0000;
    --accent-blue: #1e40af;
    --shadow-gold: rgba(212, 175, 55, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.8);
    
    /* Typography */
    --font-primary: 'Cinzel', serif;
    --font-secondary: 'Crimson Text', serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Animations */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-gold);
    letter-spacing: 2px;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    font-family: var(--font-primary);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-dark));
    color: var(--dark-bg);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
}

.btn-outline:hover {
    background: var(--primary-gold);
    color: var(--dark-bg);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

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

/* Loading state for buttons */
.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loading {
    opacity: 1;
}

.btn-loading {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--dark-bg) 0%, 
        var(--dark-bg-secondary) 50%, 
        var(--dark-bg-tertiary) 100%
    );
    z-index: -2;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, var(--shadow-gold) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 0, 0, 0.1) 0%, transparent 50%);
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.3);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-title .title-main {
    display: block;
    font-family: var(--font-primary);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--primary-gold);
    letter-spacing: 4px;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    animation: goldGlow 3s ease-in-out infinite alternate;
}

.hero-title .title-subtitle {
    display: block;
    font-family: var(--font-secondary);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--text-light);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--primary-gold);
    border-bottom: 2px solid var(--primary-gold);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

/* Features Section */
.features {
    padding: 8rem 0;
    background: var(--dark-bg-secondary);
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-gold);
    font-weight: 600;
    letter-spacing: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--dark-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--dark-border);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-gold);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Call to Action */
.cta {
    padding: 6rem 0;
    background: var(--dark-bg);
    text-align: center;
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta h2 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--primary-gold);
    font-weight: 600;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
}

.modal-content {
    background: var(--dark-bg-secondary);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: slideInUp 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--primary-gold);
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--primary-gold);
    transform: scale(1.1);
}

/* Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-group input {
    background: var(--dark-bg);
    border: 2px solid var(--dark-border);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-error {
    background: rgba(139, 0, 0, 0.2);
    border: 1px solid var(--accent-red);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    color: #ffcccb;
    font-size: 0.9rem;
    display: none;
}

.form-error.show {
    display: block;
    animation: slideInDown 0.3s ease-out;
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
}

.form-footer a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes goldGlow {
    from {
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    }
    to {
        text-shadow: 0 0 40px rgba(212, 175, 55, 0.8), 0 0 60px rgba(212, 175, 55, 0.3);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0) rotate(45deg);
    }
    40% {
        transform: translateX(-50%) translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateX(-50%) translateY(-5px) rotate(45deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-brand h1 {
        font-size: 1.2rem;
    }
    
    .nav-buttons {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .features {
        padding: 4rem 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .cta {
        padding: 4rem 0;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title .title-main {
        letter-spacing: 2px;
    }
    
    .section-title {
        letter-spacing: 1px;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        padding: 1rem;
    }
}