:root {
    --royal-purple: #2E003E;
    --royal-gold: #D4AF37;
    --royal-gold-light: #F4CF57;
    --dark-bg: #1a0b2e;
    --text-light: #f5f5f5;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Cinzel', serif;
    color: var(--royal-gold);
}

/* Background Overlay Pattern */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(46, 0, 62, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    background: linear-gradient(to bottom, rgba(26, 11, 46, 0.8), var(--dark-bg));
}

.hero-content {
    max-width: 800px;
    opacity: 0;
    /* Animated in JS/CSS */
}

.logo-container {
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.empire-logo {
    width: 200px;
    height: 200px;
    border-radius: 40px;
    /* Rounded corners for square image */
    border: 3px solid var(--royal-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    transition: transform 0.5s ease;
}

.empire-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

.royal-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.royal-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 300;
    color: #ddd;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    border: 2px solid var(--royal-gold);
    color: var(--royal-gold);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--royal-gold);
    transition: all 0.4s ease;
    z-index: -1;
}

.cta-button:hover {
    color: var(--dark-bg);
}

.cta-button:hover::before {
    left: 0;
}

/* Sections Common */
section {
    padding: 6rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--royal-gold);
}

/* About Section */
.about-section {
    text-align: center;
}

.about-content {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* Discord Section */
.discord-section {
    background: linear-gradient(to right, rgba(46, 0, 62, 0.3), rgba(26, 11, 46, 0.3));
}

.discord-card {
    background: var(--glass-bg);
    border: 1px solid var(--royal-gold);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.discord-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}

.discord-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background-color: #5865F2;
    /* Discord Blurple */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.discord-button:hover {
    background-color: #4752C4;
}

/* Guide Section */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.guide-card {
    background: linear-gradient(145deg, rgba(46, 0, 62, 0.6), rgba(26, 11, 46, 0.8));
    border: 1px solid var(--royal-gold);
    border-radius: 15px;
    padding: 2rem;
    color: #e0e0e0;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.guide-card h3 {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--royal-gold-light);
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
}

.guide-card ul {
    list-style-type: none;
    text-align: left;
}

.guide-card li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.guide-card li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--royal-gold);
    font-size: 0.8rem;
    top: 3px;
}

.guide-card strong {
    color: var(--royal-gold-light);
}

/* Gallery Section */
.gallery-intro {
    text-align: center;
    margin-bottom: 3rem;
    color: #ccc;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    border: 4px solid var(--royal-gold);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #000;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure whole image is visible */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide img.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--royal-gold);
    border: 2px solid var(--royal-gold);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-btn:hover {
    background-color: var(--royal-gold);
    color: var(--royal-purple);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.carousel-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 15px;
    border-radius: 20px;
    font-family: 'Cinzel', serif;
    color: var(--royal-gold);
    border: 1px solid var(--royal-gold);
    font-size: 0.9rem;
    z-index: 10;
}

/* Footer */
.royal-footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    color: #888;
}

.credits {
    color: var(--royal-gold);
    margin-top: 0.5rem;
}

/* Hierarchy Section */
.hierarchy-section {
    background: linear-gradient(to bottom, var(--dark-bg), rgba(46, 0, 62, 0.2));
}

.hierarchy-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hierarchy-btn {
    padding: 0.8rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--royal-gold);
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.hierarchy-btn:hover,
.hierarchy-btn.active {
    background: var(--royal-gold);
    color: var(--royal-purple);
}

.role-grid {
    position: relative;
    min-height: 400px;
}

.role-category {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.role-category.active {
    display: grid;
    animation: fadeIn 0.5s ease;
}

.role-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.role-card:hover {
    transform: translateY(-5px);
    border-color: var(--royal-gold);
}

.role-card.gold {
    border: 2px solid var(--royal-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.role-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.role-title {
    color: var(--royal-gold-light);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.role-desc {
    font-size: 0.95rem;
    color: #ccc;
}

/* Rules Section */
.rules-section {
    background: rgba(0, 0, 0, 0.3);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.rules-card {
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border-left: 4px solid var(--royal-gold);
}

.rules-card h3 {
    margin-bottom: 2rem;
    text-align: left;
}

.imperial-list {
    list-style: none;
    text-align: left;
}

.imperial-list li {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
    position: relative;
}

.imperial-list li::before {
    content: '⚜';
    position: absolute;
    left: 0;
    color: var(--royal-gold);
}

.rules-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1.2s ease-out forwards;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .royal-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}