@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Inter:wght@400;600&display=swap');

:root {
    --color-bg: #0b0101;
    --color-gold: #c5a059;
    --color-gold-bright: #ffd700;
    --color-red-dark: #2a0a0a;
    --color-red-bright: #b91c1c;
    --color-text: #cccccc;
    --color-text-highlight: #ffffff;
    --border-gold: 1px solid var(--color-gold);
    --border-dark: 1px solid #333;
}

body {
    background-color: var(--color-bg);
    background-image: url('../images/body_bg.png');
    background-repeat: repeat;
    background-position: top center; 
    color: var(--color-text);
    margin: 0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; padding: 0; margin: 0; }

.logo-wrapper {
    max-width: 300px; 
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
}

.dynamic-logo {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-gold); 
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
    line-height: 1;
    margin: 0;
    display: inline-block;
    transition: font-size 0.1s ease; 
    padding: 0 5px;
    background-color: transparent;
}

.nav-link {
    color: #a8a8a8;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 25px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    border-left: 1px solid rgba(255,255,255,0.05);
}
.nav-link:last-child { border-right: 1px solid rgba(255,255,255,0.05); }

.nav-link:hover, .nav-link.active {
    color: var(--color-gold-bright);
    background: radial-gradient(circle at center, rgba(185, 28, 28, 0.2), transparent);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

#toast-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.toast-message {
    pointer-events: auto;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
    opacity: 0;
    transform: translateY(-20px);
    animation: slideInFade 0.5s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toast-success {
    background: linear-gradient(to bottom, #064e3b, #022c22);
    border: 1px solid #10b981;
    color: #fff;
}

.toast-error {
    background: linear-gradient(to bottom, #450a0a, #2a0505);
    border: 1px solid #ef4444;
    color: #fff;
}

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

.castle-box {
    background: #000;
    border: 1px solid var(--color-gold);
    padding: 15px; 
    text-align: center;
    position: relative;
    height: 100%;
}
.castle-title {
    color: var(--color-gold);
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.castle-guild {
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem; 
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
}
.castle-master {
    color: #888;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}
.castle-master span { color: #b91c1c; font-weight: bold; } 

.castle-siege-info {
    margin-top: 15px;
    border-top: 1px solid #222;
    padding-top: 10px;
}
.siege-label { color: #666; font-size: 0.65rem; text-transform: uppercase; display: block; }
.siege-date { color: #4ade80; font-weight: bold; font-size: 0.85rem; margin-top: 3px; } 

.content-container { max-width: 1150px; margin: 0 auto; padding: 0 20px; }

.section-title {
    text-align: left;
    color: var(--color-gold);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
}
@media (min-width: 768px) {
    .section-title { font-size: 2rem; margin-bottom: 30px; }
}

.page-banner {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 2rem;
    background-color: var(--color-bg);
    background-position: top center;
    background-size: cover;
    background-image: url('../images/background.png');
}
@media (min-width: 768px) {
    .page-banner { height: 400px; }
}

.ember-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.ember {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: orangered;
    box-shadow: 0 0 10px 2px orange;
    border-radius: 50%;
    opacity: 0;
    animation: rise 5s linear infinite;
}

@keyframes rise {
    0% { bottom: -10px; transform: translateX(0); opacity: 0; }
    50% { opacity: 1; }
    100% { bottom: 100vh; transform: translateX(-20px); opacity: 0; }
}

.ember:nth-child(1) { left: 10%; width: 6px; height: 6px; animation-duration: 7s; }
.ember:nth-child(2) { left: 20%; width: 3px; height: 3px; animation-duration: 12s; animation-delay: 1s; }
.ember:nth-child(3) { left: 35%; width: 5px; height: 5px; animation-duration: 8s; animation-delay: 2s; }
.ember:nth-child(4) { left: 50%; width: 4px; height: 4px; animation-duration: 15s; }
.ember:nth-child(5) { left: 65%; width: 3px; height: 3px; animation-duration: 10s; animation-delay: 1s; }
.ember:nth-child(6) { left: 80%; width: 6px; height: 6px; animation-duration: 6s; animation-delay: 3s; }
.ember:nth-child(7) { left: 90%; width: 4px; height: 4px; animation-duration: 9s; }