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

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: url('Japan Drawing.jpg') center/cover no-repeat fixed;
    height: 100vh;
    padding: 20px;
    color: #333;
    position: relative;
    overflow: hidden;
}

html {
    overflow: hidden;
}

.favicon-box {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #c1272d;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favicon-box img {
    width: 80px;
    height: 80px;
    display: block;
}

.research-note {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: #2c2c2c;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-weight: 500;
}

body::after {
    content: 'Image Credit: www.thecanvasfactory.com.au';
    position: fixed;
    bottom: 5px;
    right: 5px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 1000;
    pointer-events: none;
}



.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    color: #2c2c2c;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: transparent;
    border-radius: 8px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #c1272d;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9), -1px -1px 2px rgba(255, 255, 255, 0.8);
}

header p {
    font-size: 1rem;
    color: #333;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.timeline-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

.scroll-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(193, 39, 45, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    z-index: 10;
}

.scroll-btn:hover {
    background: #c1272d;
    border-color: #c1272d;
    color: white;
}

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

.timeline-container {
    position: relative;
    background: transparent;
    border-radius: 8px;
    padding: 120px 0;
    border: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    flex: 1;
}

.timeline-container .timeline-line {
    pointer-events: none;
}

.timeline-container::-webkit-scrollbar {
    height: 8px;
}

.timeline-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: #c1272d;
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #a01f25;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: #c1272d;
    transform: translateY(-50%);
    box-shadow: 0 1px 3px rgba(193, 39, 45, 0.3);
    z-index: 1;
    width: 4000px;
}

.timeline-events {
    display: flex;
    gap: 280px;
    position: relative;
    min-width: max-content;
    padding: 0 100px;
    width: fit-content;
}

.timeline-event {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding-top: 110px;
    padding-bottom: 110px;
    min-height: 220px;
}

.timeline-event:hover {
    transform: translateY(3px);
}

.event-marker {
    width: 18px;
    height: 18px;
    background: white;
    border: 4px solid #c1272d;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(193, 39, 45, 0.3);
}

.timeline-event:hover .event-marker {
    background: #c1272d;
    transform: translate(-50%, -50%) scale(1.2);
}

.timeline-event.active .event-marker {
    background: #c1272d;
    transform: translate(-50%, -50%) scale(1.3);
}

.event-year {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    font-weight: 700;
    color: #c1272d;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 4px;
    border: 2px solid #c1272d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-label {
    position: absolute;
    top: calc(50% + 30px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: #2c2c2c;
    max-width: 180px;
    text-align: center;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #e0e0e0;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #f5f5f5;
}

.modal-content {
    padding: 50px 40px;
}

.modal-year {
    display: inline-block;
    background: #c1272d;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(193, 39, 45, 0.3);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 16px;
    line-height: 1.4;
}

.modal-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 0.95rem;
    }

    .timeline-wrapper {
        gap: 10px;
    }

    .scroll-btn {
        width: 40px;
        height: 40px;
    }

    .scroll-btn svg {
        width: 20px;
        height: 20px;
    }

    .timeline-container {
        padding: 50px 20px;
    }

    .timeline-line {
        left: 20px;
        right: 20px;
    }

    .timeline-events {
        gap: 60px;
    }

    .event-year {
        font-size: 1rem;
    }

    .event-label {
        font-size: 0.75rem;
        max-width: 120px;
    }

    .modal-content {
        padding: 40px 30px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .timeline-container {
        padding: 40px 15px;
    }

    .timeline-events {
        gap: 50px;
    }

    .modal-content {
        padding: 35px 25px;
    }

    .modal-close {
        width: 35px;
        height: 35px;
        top: 15px;
        right: 15px;
    }
}
