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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    padding: 20px;
    min-height: 100vh;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #58a6ff;
}

.file-upload {
    text-align: center;
    margin-bottom: 30px;
}

.file-input-wrapper {
    display: inline-block;
    position: relative;
    cursor: pointer;
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.file-input-wrapper:hover {
    background-color: #30363d;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.upload-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-icon {
    font-size: 16px;
}

.examples {
    text-align: center;
    margin-bottom: 30px;
}

.examples h2 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #58a6ff;
}

.examples select {
    margin-right: 10px;
    padding: 5px;
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 4px;
}

.examples button {
    padding: 5px 10px;
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
}

.examples button:hover {
    background-color: #30363d;
}

.trip-info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #8b949e;
}

.visualization-container {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-square {
    width: 11px;
    height: 11px;
    border-radius: 2px;
}

.grid-container {
    overflow-x: auto;
    padding-bottom: 10px;
}

.activity-grid {
    display: grid;
    gap: 3px;
    min-width: fit-content;
    margin: 0 auto;
    grid-template-rows: repeat(var(--day-count), 1fr);
}

.day-row {
    display: flex;
    gap: 3px;
    align-items: center;
}

.day-label {
    font-size: 10px;
    text-align: right;
    color: #8b949e;
    margin-right: 10px;
    width: 60px;
    white-space: nowrap;
}

.hour-cell {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid #30363d;
}

.hour-cell:hover {
    stroke: #c9d1d9;
    stroke-width: 1px;
    transform: scale(1.2);
}

/* Activity intensity colors (GitHub-like) */
.level-0 { background-color: #161b22; }
.level-1 { background-color: #0e4429; }
.level-2 { background-color: #006d32; }
.level-3 { background-color: #26a641; }
.level-4 { background-color: #39d353; }

.tooltip {
    position: absolute;
    background-color: #1c2128;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tooltip.show {
    opacity: 1;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 15px;
}

.stat-title {
    font-size: 14px;
    color: #8b949e;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #58a6ff;
}

.activity-list {
    max-height: 200px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.4;
}

.grid-with-labels {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}