/* Base Styles */
:root {
  --TC: #9d6844;  /* ThunderClan */
  --RC: #51508d;  /* RiverClan */
  --WC: #9a6375;  /* WindClan */
  --SC: #5c7348;  /* ShadowClan */
  --CL: #8ba1b5;  /* Clanless */
  --ALL: #7B836D; /* All Clans */
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    background-image: url("https://files.jcink.net/uploads2/beyondthepalerp/newskinbglightsm.jpg");
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    padding: 20px;
}

.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 30px 20px 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    transition: backdrop-filter 0.3s ease;
}

.timeline-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.05) 100%);
    z-index: 1;
}

.timeline-container > * {
    position: relative;
    z-index: 2;
}

h1 {
    font-family: 'Uncial Antiqua', cursive;
    letter-spacing: 0.5px;
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(90deg, #405f70, #334453);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.03);
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: textGlow 3s ease-in-out infinite;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.05);
}

/* Filter Buttons */
.timeline-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.filter-btn {
    font-family: 'Cinzel', serif;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease, transition 0.3s ease;
}

.filter-btn:hover {
    background: #d6eaf8;
}

.filter-btn.active {
    background: #2c3e50;
    color: white;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    width: 1px;
    background: repeating-linear-gradient(
    to bottom,
    #e0e0e0,
    #e0e0e0 2px,
    transparent 2px,
    transparent 4px
  );
}

/* Event Cards */
.event {
    position: relative;
    margin-bottom: 25px;
    padding-left: 25px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.event::before {
    content: "";
    position: absolute;
    left: -21px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
    z-index: 2;
    animation: subtlePulse 3s ease-in-out infinite;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.event-moon {
    font-weight: bold;
    color: #7B836D;
    font-size: 0.9em;
}

.event-clan {
    font-family: 'Cinzel', serif;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: #1b2631;
    margin-left: 10px;
}

.clan-TC { background: #9d6844; } /* ThunderClan */
.clan-RC { background: #51508d; } /* RiverClan */
.clan-WC { background: #9a6375; } /* WindClan */
.clan-SC { background: #5c7348; } /* ShadowClan */
.clan-CL { background: #8ba1b5; } /* Clanless */
.clan-ALL { background: #7B836D; } /* All Clans */

.event-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    margin: 5px 0;
}

.event-details {
    opacity: 0;
    padding-top: 0;
    margin-top: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    transition: height 0.5s ease, opacity 0.3s ease-in-out, padding 0.5s ease;
}

.event.expanded .event-details {
    height: auto ;
    opacity: 1;
    padding-top: 10px;
    margin-top: 10px;
    visibility: visible;
    pointer-events: auto;
    animation: fadeIn 0.3s ease;
}
.event-toggle {
    background: none;
    border: none;
    color: #2c3e50;
    cursor: pointer;
    padding: 5px 0;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.event-toggle::after {
    content: "▼";
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.event.expanded .event-toggle::after {
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 10px;
    }
    
    .event::before {
        left: -25px;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-moon {
        margin-bottom: 5px;
    }
}

/* Dark Theme */
body.dark-theme {
    background-color: #121212;
    background-image: url("https://files.jcink.net/uploads2/beyondthepalerp/newskinbgdarksm.jpg");
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #e0e0e0;
}

body.dark-theme .timeline-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 30px 20px 10px;
    background: rgba(20, 20, 20, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    transition: backdrop-filter 0.3s ease;
}

body.dark-theme h1{
    font-family: 'Uncial Antiqua', cursive;
    letter-spacing: 0.5px;
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(90deg, #ffd399, #b58bff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05);
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: textGlow 3s ease-in-out infinite;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.05);
}

body.dark-theme .event {
    background-color: rgba(15, 15, 15, 0.7);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-theme .event-title,
body.dark-theme .event-moon {
    color: #e0e0e0;
}

body.dark-theme .event-toggle {
    color: #e3ebf3;;
}

body.dark-theme .event-toggle::after {
    color: #aaa;
}

body.dark-theme .event-details {
    color: #ccc;
}

body.dark-theme .event-clan {
    font-family: 'Cinzel', serif;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: #e3ebf3;
    margin-left: 10px;
}

body.dark-theme .timeline::before {
    background: repeating-linear-gradient(
        to bottom,
        #444,
        #444 2px,
        transparent 2px,
        transparent 4px
    );
}

body.dark-theme .filter-btn {
    color: #ddd;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease, transform 0.3s ease;
}

body.dark-theme .filter-btn:hover {
    background: #3a3a3a;
}

body.dark-theme .filter-btn.active {
    background: #ffd399;
    color: #2c3e50;
}

/* Theme toggle */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ecf0f1;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #2c3e50;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 999;
    transition: all 0.3s ease, color 0.3s ease;
}

body.dark-theme #theme-toggle {
    background: #2c2c2c;
    color: #f1f1f1;
}

#theme-toggle:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4), 0 0 20px rgba(255, 255, 255, 0.2);
    transition: box-shadow 0.3s ease;
}

#theme-toggle.animate {
    animation: wiggle 0.4s ease;
}

/*Animation keyframes*/
@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 0 3px rgba(255, 255, 255, 0.15);}
    50% { box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);}
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 6px rgba(255, 255, 255, 0.05); }
    50% { text-shadow: 0 0 12px rgba(255, 255, 255, 0.25); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

