:root {
    --bg-dark: #070a12;
    --panel-bg: rgba(11, 20, 38, 0.85);
    --gold-light: #FCE18D;
    --gold: #D4AF37;
    --gold-dark: #997A00;
    --tabard-blue: #0B2447;
    --tabard-blue-light: #163a6e;
    --arcane-cyan: #00E5FF;
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 3D Background Overlay mimicking Ampitheater vibes */
.site-background {
    position: fixed;
    /* Stretch the div 30px off the screen in every direction to hide the blur halo */
    top: -30px; left: -30px; right: -30px; bottom: -30px; 
    width: auto; height: auto;
    background: url('Ampitheater_2.jpg') no-repeat center center fixed;
    background-size: cover;
    filter: blur(8px) brightness(0.25);
    z-index: -2;
}

.watermark {
    position: fixed;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 800px; height: 800px;
    background: url('Renown_flag.png') no-repeat center center;
    background-size: contain;
    opacity: 0.05; 
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
}

h2 { font-size: 2.2rem; border-bottom: 1px solid rgba(212, 175, 55, 0.3); padding-bottom: 10px; margin-bottom: 20px;}
h3 { font-size: 1.5rem; margin-bottom: 15px; color: var(--gold-light); }

.highlight-text {
    color: var(--gold-light);
    font-weight: 600;
    font-size: 1.2rem;
    text-align: left;
}

.glowing {
    text-shadow: 0 0 10px var(--gold-dark), 0 0 20px var(--gold);
}

.highlight-box {
    background: linear-gradient(90deg, transparent, rgba(11, 36, 71, 0.7), transparent);
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--gold-light);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    margin: 20px 0;
}

.wow-divider {
    border: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold-dark), var(--gold), var(--gold-dark), transparent);
    margin: 40px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Header Layout & Centering */
.site-header {
    background: linear-gradient(to bottom, rgba(5, 10, 20, 0.95) 0%, rgba(5, 10, 20, 0.6) 60%, transparent 100%);
    padding: 60px 20px 40px; 
    width: 100%;
    display: flex;
    justify-content: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.guild-logo {
    width: 220px;
    height: auto;
    border-radius: 50%;
    border: 4px solid var(--gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), inset 0 0 20px rgba(0,0,0,0.8);
    margin-bottom: 0; /* Removed the 15px margin pushing the text down */
}

.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.title-image {
    width: 100%;
    max-width: 750px;
    height: auto;
    display: block;
    /* The -40px pulls the image up. The 'auto' keeps it perfectly centered. */
    margin: -90px auto 0; 
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.8));
}

/* 3D Navigation Tabs */
.tab-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
    background: rgba(0,0,0,0.6);
    border-top: 2px solid var(--gold-dark);
    border-bottom: 2px solid var(--gold-dark);
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.tab-btn {
    background: linear-gradient(to bottom, #11203d, #070d1a);
    border: 1px solid var(--gold-dark);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 4px 6px rgba(0,0,0,0.6);
    transition: all 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.tab-btn:hover {
    background: linear-gradient(to bottom, #1a305c, #0d182e);
    border-color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 12px rgba(0,0,0,0.8), 0 0 10px rgba(11, 36, 71, 0.8);
}

.tab-btn.active {
    background: linear-gradient(to bottom, var(--tabard-blue-light), var(--tabard-blue));
    color: var(--gold-light);
    border-color: var(--gold);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 0 15px rgba(212, 175, 55, 0.4);
    transform: translateY(1px);
}

/* UI Panels */
.content-container {
    max-width: 1450px;
    width: 95%;
    margin: 40px auto 40px; 
    padding: 40px;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    border: 2px solid #3d2a1c;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), inset 0 0 30px rgba(0,0,0,0.8);
    position: relative;
    z-index: 10;
}

.split-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.ui-panel {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 20px;
    border-radius: 6px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.6);
}

.mt-30 { margin-top: 30px; }
.text-center { text-align: center; }

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Lists & Grids */
.guild-goals { list-style-type: none; padding-left: 20px; }
.guild-goals li { position: relative; margin-bottom: 12px; padding-left: 30px; font-size: 1.1rem; }
.guild-goals li::before {
    content: "✦"; color: var(--gold); position: absolute; left: 0; top: 0; font-size: 1.2rem; text-shadow: 0 0 5px var(--gold);
}

.roster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; }
.roster-col ul { list-style-type: none; margin-top: 10px; }
.roster-col li { margin-bottom: 8px; padding-left: 10px; border-left: 2px solid var(--tabard-blue-light); }

/* Buttons */
.wow-btn {
    display: inline-block;
    background: linear-gradient(to bottom, #8B0000, #4A0000); 
    color: var(--gold-light);
    border: 2px solid var(--gold-dark);
    padding: 12px 25px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,100,100,0.3), 0 4px 10px rgba(0,0,0,0.8);
    transition: all 0.2s ease;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

.wow-btn:hover {
    background: linear-gradient(to bottom, #A50000, #5C0000);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4), 0 6px 15px rgba(0,0,0,0.9);
    transform: translateY(-2px);
}

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }

/* Calendar UI */
.calendar-container {
    background: rgba(0,0,0,0.7);
    border: 2px solid var(--gold-dark);
    border-radius: 6px;
    padding: 20px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.9);
}

.calendar-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}

.cal-nav {
    background: transparent; color: var(--gold); border: none; font-size: 2rem; cursor: pointer; transition: 0.2s;
}
.cal-nav:hover { color: var(--gold-light); text-shadow: 0 0 10px var(--gold); }

.calendar-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center;
}

.cal-day-header {
    font-family: var(--font-heading); color: var(--gold); font-weight: bold; padding-bottom: 10px; border-bottom: 1px solid var(--gold-dark);
}

.cal-day {
    background: rgba(11, 36, 71, 0.3);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 15px 5px;
    border-radius: 4px;
    position: relative;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.cal-day:hover:not(.empty) {
    background: rgba(11, 36, 71, 0.8);
    border-color: var(--gold-light);
    transform: scale(1.05);
}

.cal-day.empty { background: transparent; border: none; }

.has-event { border-color: var(--gold-dark); }
.event-dot {
    display: block; width: 6px; height: 6px; background: #10B981; border-radius: 50%;
    position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
    box-shadow: 0 0 5px #10B981;
}

/* Complaint Section & Shake */
.red-btn {
    background: linear-gradient(to bottom, #3f0000, #1a0000); color: #ff4d4d; border: 2px solid #ff4d4d;
    padding: 12px 25px; font-family: var(--font-heading); text-transform: uppercase; font-weight: bold;
    cursor: pointer; transition: 0.2s; border-radius: 4px; margin-top: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}
.red-btn:hover { background: linear-gradient(to bottom, #5c0000, #2a0000); box-shadow: 0 0 15px rgba(255, 77, 77, 0.4); }
.shake { animation: shake 0.5s 1; }
@keyframes shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-2px, -2px) rotate(-1deg); }
    20%, 40%, 60%, 80% { transform: translate(2px, 2px) rotate(1deg); }
}

/* Modals (Complaint & Application) */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.85); 
    backdrop-filter: blur(5px); 
    overflow-y: auto; /* Allows the entire overlay to scroll if window is small */
    padding: 40px 0;   /* Adds top and bottom breathing room so it floats */
}

.modal-content { 
    margin: 0 auto;    /* Centers it horizontally, removes the old 10% auto margin */
    width: 90%; 
    max-width: 550px; 
    position: relative; 
    /* Removed max-height/overflow-y from here so the whole box scrolls cleanly */
}
.close-modal { 
    position: absolute; 
    top: 5px; 
    right: 10px; 
    color: #ff4d4d; 
    font-size: 32px; 
    font-weight: bold; 
    cursor: pointer; 
    z-index: 9999;
    line-height: 1;
    padding: 15px;
}
.close-modal:hover { color: #ff4d4d; }
#complaint-text { width: 100%; background-color: rgba(0,0,0,0.8); color: var(--text-main); border: 1px solid var(--gold-dark); padding: 15px; font-family: var(--font-body); margin: 15px 0; resize: vertical; border-radius: 4px; }
#complaint-text:focus { outline: none; border-color: var(--gold-light); box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }
.toxic-response { margin-top: 20px; padding: 15px; background-color: rgba(255, 77, 77, 0.1); border-left: 4px solid #ff4d4d; color: #ff4d4d; font-weight: 600; text-shadow: 0 0 5px rgba(255,0,0,0.3); }
.hidden { display: none; }

/* Application Form Inputs */
.form-input {
    width: 100%; background: rgba(0,0,0,0.6); color: var(--text-main);
    border: 1px solid var(--gold-dark); padding: 12px; font-family: var(--font-body);
    border-radius: 4px; margin-bottom: 10px;
}
.form-input:focus { outline: none; border-color: var(--arcane-cyan); box-shadow: 0 0 8px rgba(0, 229, 255, 0.4); }

@media (max-width: 1024px) {
    .split-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .roster-grid, .contact-grid { grid-template-columns: 1fr; }
}

/* --- Helper Spacing --- */
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }

/* --- Inset Lore Images --- */
.lore-banner-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    margin-top: 20px;
    display: block;
}

.citadel-frame {
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8), 0 4px 12px rgba(0,0,0,0.7);
}

.citadel-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.citadel-img:hover {
    transform: scale(1.03);
}

.lore-highlight {
    line-height: 1.5;
    padding: 10px 0;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* --- Raiding Tab Motto & Bragging Rights --- */
.bragging-title {
    font-size: 1.6rem;
    letter-spacing: 2px;
    text-align: center;
    margin: 25px 0 10px;
}

.raid-motto-stacked {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 2px;
    text-align: center;
    padding-top: 10px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* --- End-Game Progression Box --- */
.progression-panel {
    background: linear-gradient(180deg, rgba(11, 20, 38, 0.95) 0%, rgba(5, 10, 20, 0.98) 100%);
    border: 2px solid var(--gold-dark);
    padding: 35px 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8), inset 0 0 20px rgba(212, 175, 55, 0.1);
}

.progression-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Slide-Out Drawer --- */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: -550px;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 20, 38, 0.98) 0%, rgba(5, 10, 20, 0.98) 100%);
    border-left: 2px solid var(--gold-dark);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.drawer.open {
    right: 0;
}

.drawer-header {
    padding: 25px 25px 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.close-btn {
    background: none;
    border: none;
    color: var(--gold-light);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 0.8;
}

.drawer-body {
    padding: 25px;
    flex-grow: 1;
}

.roster-container {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.roster-col {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    padding: 10px;
}

.roster-col h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.roster-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: #ddd;
}

.roster-list li {
    margin-bottom: 4px;
    text-align: center;
}

.drawer-footer {
    padding: 25px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

/* Background Image Panels for Raiding Tab */
.bg-image-panel {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}
.split-layout-reversed {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 1024px) {
    .split-layout-reversed { 
        grid-template-columns: 1fr; 
    }
}