/* 全体のリセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    background-color: #fff;
}

/* ヘッダースタイル */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
}

h1 {
    font-size: 20px;
    font-weight: bold;
    color: #000;
}

/* 物件タイプセレクター */
.property-selector {
    position: relative;
    width: 200px;
}

.selected-property {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
}

.property-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.property-icon.total {
    background-color: #1e3a8a;
}

.property-icon.land {
    background-color: #166534;
}

.property-icon.house {
    background-color: #ea580c;
}

.property-icon.mansion {
    background-color: #dc2626;
}

.property-name {
    flex-grow: 1;
    font-size: 14px;
}

.dropdown-icon {
    font-size: 12px;
    margin-left: 5px;
}

.property-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: none;
}

.property-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
}

.property-option:hover {
    background-color: #f5f5f5;
}

/* 期間表示 */
.period-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#period-range {
    color: #666;
    font-size: 16px;
}

#percentage-change {
    font-size: 28px;
    font-weight: bold;
}

.percentage-positive {
    color: #1e40af;
}

.percentage-negative {
    color: #dc2626;
}

/* グラフコンテナ */
.chart-container {
    width: 100%;
    height: 250px;
    margin-bottom: 20px;
    position: relative;
}

/* 期間セレクター */
.period-selector {
    display: flex;
    justify-content: space-between;
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
}

.period-button {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    color: #666;
}

.period-button.active {
    background-color: #1e40af;
    color: white;
}

/* 凡例 */
.legend {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

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

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
}

.legend-color.total {
    background-color: #1e3a8a;
}

.legend-color.land {
    background-color: #166534;
}

.legend-color.house {
    background-color: #ea580c;
}

.legend-color.mansion {
    background-color: #dc2626;
}

.legend-label {
    font-size: 12px;
    color: #666;
}

/* フッター */
footer {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.reference, .creator {
    margin-bottom: 5px;
}

footer a {
    color: #1e40af;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* レスポンシブデザイン */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        padding: 20px;
    }

    h1 {
        font-size: 28px;
    }

    .chart-container {
        height: 300px;
    }

    .period-button {
        font-size: 16px;
    }

    .legend-label {
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding: 30px;
    }

    .chart-container {
        height: 350px;
    }
}
