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

:root {
    --primary-blue: #0038b8;
    --secondary-blue: #0047d9;
    --light-blue: #3366cc;
    --very-light-blue: #e6f0ff;
    --war-green: #1b5e20;
    --war-light-green: #2e7d32;
    --war-very-light-green: #e8f5e9;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-gray: #4a4a4a;
    --text-light: #6b6b6b;
    --border-color: #d4e0f7;
    --war-border-color: #c8e6c9;
    --shadow: rgba(0, 56, 184, 0.1);
    --shadow-strong: rgba(0, 56, 184, 0.25);
    --war-shadow: rgba(27, 94, 32, 0.1);
    --war-shadow-strong: rgba(27, 94, 32, 0.25);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--very-light-blue) 0%, var(--white) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 80px 20px;
    margin-bottom: 60px;
    box-shadow: 0 10px 40px var(--shadow-strong);
    border-radius: 0 0 30px 30px;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.site-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: fadeInLogo 0.8s ease-out;
}

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

.title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.95;
    letter-spacing: 1px;
}

.description {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: right;
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--white);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Donation Section in Hero */
.donation-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.donation-text {
    font-size: 1.05rem;
    margin-bottom: 15px;
    opacity: 0.95;
}

.donation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.donation-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.donation-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.donation-btn svg {
    width: 18px;
    height: 18px;
}

.paypal-btn {
    background: #0070ba;
    color: var(--white);
}

.paypal-btn:hover {
    background: #005a92;
}

.coffee-btn {
    background: #FFDD00;
    color: #000000;
}

.coffee-btn:hover {
    background: #e6c700;
}

/* Timeline */
.filters-container {
    background: var(--white);
    border-radius: 15px;
    padding: 25px 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px var(--shadow);
    border: 2px solid var(--border-color);
}

.filters-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.filter-options {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 10px 15px;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.filter-checkbox:hover {
    background: var(--very-light-blue);
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #999;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    background: #e0e0e0;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: #666;
    border-color: #666;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 16px;
    font-weight: bold;
}

.filter-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}

.filter-count {
    background: var(--primary-blue);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.filter-checkbox:has(#filterWars) .filter-count {
    background: var(--war-green);
}

/* Year Separators */
.year-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 60px 0 40px;
    position: relative;
    z-index: 10;
}

.year-separator-line {
    display: none;
}

.year-separator-badge {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.8rem;
    font-weight: 900;
    box-shadow: 0 5px 20px var(--shadow-strong);
    min-width: 120px;
    text-align: center;
    letter-spacing: 1px;
    position: relative;
    z-index: 10;
}

/* Year Navigation Sidebar */
.year-navigation {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border-radius: 15px;
    padding: 20px 15px;
    box-shadow: 0 5px 25px var(--shadow-strong);
    border: 2px solid var(--border-color);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s ease;
}

.year-navigation::-webkit-scrollbar {
    width: 6px;
}

.year-navigation::-webkit-scrollbar-track {
    background: var(--very-light-blue);
    border-radius: 10px;
}

.year-navigation::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

.year-nav-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.year-nav-item {
    display: block;
    padding: 10px 20px;
    margin: 5px 0;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.year-nav-item:hover {
    background: var(--very-light-blue);
    color: var(--primary-blue);
    transform: translateX(5px);
}

.year-nav-item.active {
    background: var(--primary-blue);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 3px 10px var(--shadow);
}

/* Scroll Buttons (Right Side) */
.scroll-buttons-container {
    position: fixed;
    right: 20px;
    top: 15%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.scroll-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #6b6b6b;
    color: var(--white);
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.scroll-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #4a4a4a;
}

.scroll-btn:active {
    transform: scale(0.95);
}

.timeline-container {
    position: relative;
    padding: 40px 0;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-blue), var(--light-blue));
    transform: translateX(2px);
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 60px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item:nth-child(odd) {
    padding-left: calc(50% + 40px);
}

.timeline-item:nth-child(even) {
    padding-right: calc(50% + 40px);
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: 50%;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border: 4px solid var(--white);
    border-radius: 50%;
    transform: translateX(10px);
    box-shadow: 0 0 0 6px var(--very-light-blue);
    z-index: 2;
}

.timeline-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px var(--shadow);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--primary-blue), var(--light-blue));
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-strong);
    border-color: var(--primary-blue);
}

/* Card Content */
.card-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: -10px;
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--primary-blue);
    box-shadow: 0 4px 15px var(--shadow-strong);
    object-fit: cover;
    background: var(--white);
}

.card-date {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-target {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-blue);
    margin-bottom: 5px;
    line-height: 1.3;
}

.card-target-english {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 10px;
    font-style: italic;
    direction: ltr;
    text-align: center;
}

.card-organization {
    font-size: 1.15rem;
    color: var(--text-gray);
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
}

.map-link {
    display: inline-block;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--very-light-blue);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-right: 8px;
}

.map-link:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.card-details {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.detail-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.detail-label {
    font-weight: 700;
    color: var(--primary-blue);
    min-width: 120px;
    font-size: 0.95rem;
}

.detail-value {
    color: var(--text-dark);
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-context {
    background: var(--very-light-blue);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    border-right: 4px solid var(--primary-blue);
    font-style: italic;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.card-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #856404;
}

/* War Cards */
.war-card {
    border-color: var(--war-border-color);
    box-shadow: 0 5px 20px var(--war-shadow);
}

.war-card::before {
    background: linear-gradient(to right, var(--war-green), var(--war-light-green));
}

.war-card:hover {
    box-shadow: 0 10px 30px var(--war-shadow-strong);
    border-color: var(--war-green);
}

.war-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 15px;
    margin-top: -5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.war-date {
    background: var(--war-green);
    padding: 12px 18px;
    display: block;
    text-align: center;
}

.war-date-label {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 6px;
}

.war-date-range {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.war-date-duration {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 6px;
    opacity: 0.95;
    font-style: italic;
}

.war-title {
    color: var(--war-green);
}

.war-context {
    background: var(--war-very-light-green);
    border-right-color: var(--war-green);
}

.timeline-item[data-type="war"]::before {
    background: var(--war-green);
    box-shadow: 0 0 0 6px var(--war-very-light-green);
}


/* Footer */
.footer {
    text-align: center;
    padding: 60px 20px 40px;
    color: var(--text-gray);
    border-top: 2px solid var(--border-color);
    margin-top: 80px;
    background: var(--white);
}

.footer-donation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    font-size: 1rem;
    font-weight: 600;
}

.footer-donate-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-donate-link:hover {
    transform: translateY(-2px);
}

.footer-donate-link:first-of-type {
    background: #0070ba;
    color: var(--white);
}

.footer-donate-link:first-of-type:hover {
    background: #005a92;
}

.footer-donate-link:last-of-type {
    background: #FFDD00;
    color: #000000;
}

.footer-donate-link:last-of-type:hover {
    background: #e6c700;
}

.footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-logo {
        width: 90px;
        margin-bottom: 15px;
    }

    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.3rem;
    }

    .description {
        font-size: 1rem;
    }

    .stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .filters-container {
        padding: 20px;
    }

    .filters-title {
        font-size: 1.1rem;
    }

    .filter-options {
        gap: 15px;
    }

    .filter-label {
        font-size: 0.95rem;
    }

    /* Year navigation - move to bottom on mobile */
    .year-navigation {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        transform: none;
        border-radius: 15px 15px 0 0;
        max-height: 40vh;
        padding: 15px 10px;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .year-nav-title {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        padding-bottom: 0;
        padding-left: 10px;
        border-bottom: none;
        border-left: 2px solid var(--border-color);
        margin-bottom: 0;
        margin-left: 10px;
    }

    .year-nav-item {
        display: inline-block;
        padding: 8px 15px;
        margin: 0 3px;
    }

    .year-nav-item:hover {
        transform: translateY(-3px);
    }

    /* Move scroll buttons to top-left on mobile */
    .scroll-buttons-container {
        top: 90px;
        left: 10px;
        right: auto;
        transform: none;
        flex-direction: column;
        gap: 10px;
    }

    .scroll-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .year-separator-badge {
        font-size: 1.4rem;
        padding: 10px 20px;
        min-width: 100px;
    }

    .donation-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .donation-btn {
        width: 100%;
        justify-content: center;
    }

    .footer-donation {
        flex-direction: column;
        gap: 10px;
    }

    .timeline::before {
        right: 20px;
    }

    .timeline-item {
        padding-left: 60px !important;
        padding-right: 0 !important;
        text-align: right !important;
    }

    .timeline-item::before {
        right: 11px;
        transform: none;
    }

    .avatar-img {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }

    .war-icon {
        font-size: 3rem;
    }

    .card-target {
        font-size: 1.5rem;
    }

    .card-target-english {
        font-size: 1rem;
    }

    .card-organization {
        font-size: 1rem;
    }

    .detail-row {
        flex-direction: column;
        gap: 5px;
    }

    .detail-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 15px;
    }

    .site-logo {
        width: 70px;
        margin-bottom: 12px;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .filters-container {
        padding: 15px;
    }

    .filters-title {
        font-size: 1rem;
    }

    .filter-options {
        flex-direction: column;
        gap: 10px;
    }

    .year-separator {
        margin: 40px 0 30px;
    }

    .year-separator-badge {
        font-size: 1.2rem;
        padding: 8px 15px;
        min-width: 80px;
    }

    .year-navigation {
        padding: 10px 8px;
    }

    .year-nav-item {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .timeline-card {
        padding: 20px;
    }

    .avatar-img {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .war-icon {
        font-size: 2.5rem;
    }

    .card-target {
        font-size: 1.3rem;
    }

    .card-target-english {
        font-size: 0.9rem;
    }

    .card-organization {
        font-size: 0.95rem;
    }
}
