/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #0b0c10;
    --card-bg: #1f2833;
    --text-main: #c5c6c7;
    --accent-gold: #d4af37; /* Gold */
    --accent-glow: #66fcf1; /* Cyan glow for contrast or keep gold */
    --accent-secondary: #45a29e;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lato:wght@300;400;700&display=swap');

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 12, 16, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    color: var(--accent-gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.4)), url('images/OldMadMageHD.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 4rem;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(0,0,0,1);
    animation: fadeInUp 1s ease-out 0.5s backwards;
}

.cta-button {
    padding: 1rem 2.5rem;
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.cta-button:hover {
    background: var(--accent-gold);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* --- SECTIONS GENERAL --- */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '⚔️';
    display: block;
    font-size: 1.5rem;
    margin-top: 10px;
    opacity: 0.7;
}

/* --- ABOUT SECTION --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-image {
    width: 100%;
    height: 400px;
    background-image: url("images/OldMadMage.jpg");
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    box-shadow: 10px 10px 0 var(--accent-gold);
    transition: transform 0.3s;
}

.about-image:hover {
    transform: translate(-5px, -5px);
    box-shadow: 15px 15px 0 var(--accent-gold);
}

/* --- FEATURES/COMMUNITY SECTION --- */
.features {
    background-color: #12141a;
    padding: 5rem 0;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    text-align: center;
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.feature-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #fff;
}

/* --- RESOURCES SECTION --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.resource-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    group;
}

.resource-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.resource-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    transition: background 0.3s;
}

.resource-item:hover .resource-bg {
    transform: scale(1.1);
}

.resource-item:hover .resource-overlay {
    background: rgba(0,0,0,0.4);
}

.resource-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.resource-item:hover h3 {
    border-color: var(--accent-gold);
}

.resource-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* --- FOOTER --- */
footer {
    background: #050505;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid #222;
}

.social-links {
    margin: 2rem 0;
}

.social-btn {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 20px;
    background: #5865F2; /* Discord color */
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

.social-btn:hover {
    background: #4752c4;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
}

/* --- NEW UTILITIES FOR TEXT --- */
.feature-card p {
    text-align: left; /* Essential for reading long rules */
    font-size: 1rem;
    color: #b0b1b3;
    width: 100%;
}

.cta-button {
    padding: 1rem 2.5rem;
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 2rem;
}

.cta-button:hover {
    background: var(--accent-gold);
    color: var(--bg-color);
}

/* --- FOOTER --- */
footer {
    background: #050505;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid #222;
}

.social-links {
    margin: 2rem 0;
}

.social-btn {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 20px;
    background: #5865F2;
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

/* --- ANIMATIONS --- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; } /* Add JS for hamburger if needed, kept simple for CSS-only */
    .about-grid { grid-template-columns: 1fr; }
    .resources-grid { grid-template-columns: 1fr; }
    .features-container { grid-template-columns: 1fr; }
    
    .mobile-menu-btn { display: block; }
}