* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: Arial, sans-serif; background-color: #f5f5f5; color: #333; } .container { width: 100%; margin: 0 auto; padding: 20px; } .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } /* Month Navigator */ .month-navigator { display: flex; align-items: center; gap: 8px; max-width: 60%; } .nav-arrow { width: 36px; height: 36px; border: 1px solid #ddd; border-radius: 4px; background-color: white; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s, border-color 0.2s; flex-shrink: 0; } .nav-arrow:hover:not(:disabled) { background-color: #f0f0f0; border-color: #999; } .nav-arrow:disabled { opacity: 0.4; cursor: not-allowed; } .month-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; } .month-list::-webkit-scrollbar { display: none; } .month-btn { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; background-color: white; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background-color 0.2s, border-color 0.2s, color 0.2s; display: flex; flex-direction: column; align-items: center; gap: 6px; } .month-btn:hover { background-color: #f0f0f0; border-color: #999; } .month-btn.active { background-color: #5470c6; border-color: #5470c6; color: white; } .month-preview { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #eee; position: relative; } .month-preview::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 35%; height: 35%; background: white; border-radius: 50%; } .month-btn.active .month-preview { border-color: rgba(255, 255, 255, 0.3); } .month-btn.active .month-preview::after { background: #5470c6; } .month-label { font-size: 12px; } .content-wrapper { display: flex; position: relative; } #chart-container { width: 70%; height: 80vh; background-color: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } #details-box { position: absolute; top: 10px; right: 10px; width: 35vw; min-width: 300px; max-width: 650px; background-color: white; border-radius: 8px; box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15); padding: 20px; z-index: 10; min-height: auto; max-height: 80vh; overflow-y: auto; opacity: 0.98; border: 1px solid #eee; margin-left: 0; } #details-box h3 { margin-bottom: 15px; color: #333; font-size: 18px; border-bottom: 1px solid #eee; padding-bottom: 8px; } #details-box h4 { margin: 10px 0 5px; color: #555; font-size: 14px; } .details-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 10px 0; border-bottom: 1px solid #eee; border-top: 1px solid #eee; } .hover-name { font-weight: bold; color: #333; word-break: break-word; flex: 1; display: flex; align-items: center; font-size: 16px; } .hover-amount { font-size: 18px; color: #0066cc; font-weight: bold; margin-left: 10px; white-space: nowrap; text-align: right; min-width: 120px; } .color-circle { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; flex-shrink: 0; } #top-items { font-size: 14px; } .top-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #eee; } .top-item:last-child { border-bottom: none; } .top-item-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; min-width: 0; } .top-item-amount { margin-left: 15px; font-weight: bold; min-width: 120px; text-align: right; flex-shrink: 0; } /* Add responsive design for smaller screens */ @media (max-width: 1200px) { #details-box { max-width: 300px; } } @media (max-width: 850px) { .header { flex-direction: column; align-items: flex-start; gap: 15px; } .month-navigator { max-width: 100%; width: 100%; } .content-wrapper { flex-direction: column; } #chart-container { width: 100%; height: 90lvw } #details-box { position: relative; top: 0; right: 0; width: 100%; margin-top: 20px; max-height: 300px; min-width: 100%; } .top-item-amount { min-width: 80px; } } @media (max-width: 500px) { .month-btn { padding: 6px 8px; font-size: 12px; } .month-preview { width: 32px; height: 32px; } .month-label { font-size: 10px; } .nav-arrow { width: 30px; height: 30px; font-size: 20px; } }