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

body {
    font-family: 'Arial', sans-serif;
    background: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    text-align: center;
    padding: 20px;
}

#timeline-canvas {
    border: 3px solid #2d3436;
    border-radius: 10px;
    background: linear-gradient(to bottom, #a8e6cf, #7fcdcd);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    pointer-events: none;
}

.modal-content {
    background-color: #fefefe;
    position: absolute;
    padding: 15px;
    border: 2px solid #2d3436;
    border-radius: 8px;
    width: 250px;
    max-width: 300px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    pointer-events: all;
    font-family: 'Courier New', monospace;
}

.modal-content::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fefefe;
}

.close {
    color: #aaa;
    float: right;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

#modal-title {
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
}

#modal-description {
    color: #636e72;
    line-height: 1.4;
    font-size: 14px;
}

/* Game-style dialog box */
.game-dialog {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    max-width: 90vw;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border: 3px solid #ecf0f1;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    font-family: 'Courier New', monospace;
    animation: dialogSlideUp 0.3s ease-out;
}

@keyframes dialogSlideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.dialog-header {
    background: linear-gradient(90deg, #3498db, #2980b9);
    color: white;
    padding: 12px 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.dialog-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.dialog-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dialog-content {
    padding: 20px;
    color: #ecf0f1;
    line-height: 1.8;
    font-size: 16px;
    min-height: 140px;
    cursor: pointer;
    position: relative;
    white-space: pre-line;
}

.dialog-content::after {
    content: '▌';
    color: #3498db;
    animation: blink 1s infinite;
    margin-left: 2px;
}

.dialog-content.typing-complete::after {
    display: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.dialog-actions {
    padding: 15px 20px;
    border-top: 2px solid #34495e;
    text-align: right;
    background: linear-gradient(90deg, #2c3e50, #34495e);
}

.dialog-btn {
    background: linear-gradient(145deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid #2ecc71;
    position: relative;
    overflow: hidden;
}

.dialog-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.dialog-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.5);
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    border-color: #27ae60;
}

.dialog-btn:hover:before {
    left: 100%;
}

.dialog-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}
