/* 1. GLOBAL STYLES */
:root {
    --text-heading: #EAE2B7;
    --text-body: #D4C6A8;
    --border-light: #4D4538;
    --border-med: #665A48;
    --bg-dark: #1D1A14;
    --bg-med: #2A251E;
    --bg-light: #3C352A;
    --brand-purple: #A463D8;
    --brand-gold: #FFC94A;
}

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

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-body);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: url('https://www.transparenttextures.com/patterns/dark-leather.png');
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

main {
    flex-grow: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    color: var(--text-heading);
}

/* 2. TOP NAVIGATION */
.main-header {
    height: 70px;
    border-bottom: 2px solid var(--border-light);
    background-color: rgba(29, 26, 20, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background-color: var(--brand-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--bg-dark);
    font-weight: bold;
    font-family: 'Cinzel', serif;
}

.logo-icon::before {
    content: 'H';
}


.logo-text {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading);
    text-shadow: 0 0 5px rgba(255, 201, 74, 0.5);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-body);
    transition: color 0.2s ease, text-shadow 0.2s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--brand-gold);
    border-bottom: 2px solid var(--brand-gold);
}

.dashboard-button {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid var(--brand-gold);
    border-radius: 8px;
    background: linear-gradient(145deg, var(--brand-gold), #d4a03a);
    color: var(--bg-dark);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(255, 201, 74, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.dashboard-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 201, 74, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* 3. HERO SECTION (HOMEPAGE & TOOL PAGES) */
.hero {
    position: relative;
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(to bottom, rgba(29, 26, 20, 0.5), var(--bg-dark)), url('https://cdn.hytale.com/59c3d43478959_hytale_artwork_1.jpeg') no-repeat center center/cover;
    overflow: hidden;
    border-bottom: 2px solid var(--border-light);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 64px;
    font-weight: 700;
    color: var(--brand-gold);
    margin-bottom: 16px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
}

.hero p {
    font-size: 20px;
    color: var(--text-heading);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 5px rgba(0,0,0,0.8);
}

/* 4. TOOL CARDS GRID (HOMEPAGE) */
.tools-section {
    padding: 60px 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.tool-card {
    background-color: var(--bg-med);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border: 2px solid var(--border-light);
}
.tool-card:hover {
    transform: translateY(-5px);
    background-color: var(--bg-light);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--brand-gold);
}


.tool-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--bg-dark);
    background: var(--brand-gold);
}

.card-text h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-gold);
    margin-bottom: 8px;
}

.card-text p {
    font-size: 16px;
    color: var(--text-body);
    line-height: 1.5;
}

/* 5. GENERIC PAGE CONTENT (ABOUT, PRIVACY, ETC.) */
.page-content {
    padding: 60px 0;
    background: var(--bg-med);
    margin-top: -1px; /* Overlap hero border */
}
.page-content .container {
     max-width: 840px;
}
.page-content h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--brand-gold);
    margin-bottom: 16px;
    text-align: center;
}
.page-content h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-heading);
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-med);
    padding-bottom: 10px;
}
.page-content p, .page-content li {
    font-size: 17px;
    margin-bottom: 16px;
    max-width: 800px;
    line-height: 1.7;
}
.page-content .subtitle {
    font-size: 20px;
    color: var(--text-body);
    max-width: 600px;
    margin-bottom: 40px;
    text-align: center;
}

/* 8. FOOTER */
.main-footer {
    background-color: var(--bg-dark);
    border-top: 2px solid var(--border-light);
    padding: 40px 0;
    margin-top: auto;
    flex-shrink: 0;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}
.footer-links a {
    color: var(--text-body);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}
.footer-links a:hover {
    color: var(--brand-gold);
    text-decoration: underline;
}
.footer-copyright {
    font-size: 15px;
    color: #9ca3af;
}

/* 9. RESPONSIVE BEHAVIOR */
@media (max-width: 768px) {
    .main-nav ul {
        display: none;
    }

    .hero {
        padding: 60px 0;
    }
    .hero h1 {
        font-size: 48px;
    }
    .hero p {
        font-size: 18px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .page-content h1 {
        font-size: 36px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
}
