/* 基本スタイル */
:root {
    --primary-color: #3498db;
    --background-color: #f4f8fa;
    --container-bg: #ffffff;
    --text-color: #333;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 10px;
}
.container {
    max-width: 700px;
    margin: 10px auto;
    background-color: var(--container-bg);
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}
.info-section {
    padding: 15px 20px;
    border-top: 2px solid #ddd;
}
.info-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    font-size: 1.1em;
}

/* トップイメージと日付 */
.header-image { 
    background-image: url('s.png');
    background-size: cover;
    background-position: center;
    color: white; 
    padding: 40px 20px; 
    text-align: center;
    position: relative;
    z-index: 1;
}
@media (min-width: 601px) { .header-image { background-image: url('m.png'); } }
@media (min-width: 1001px) { .header-image { background-image: url('l.png'); } }
.header-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}
.header-image h1 { 
    margin: 0; 
    font-size: 2em; 
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}
.site-subtitle {
    font-size: 0.8em;
    margin: 5px 0 10px 0;
    font-weight: normal;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    color: white;
    line-height: 1.2;
}
.selector-container {
    text-align: right;
    padding: 10px 20px 0 20px;
}
#country-selector {
    font-size: 0.9em;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
}
#country-selector option { color: black; }

.date-picker-wrapper { text-align: center; padding: 5px 0 20px 0; }

#main-date-display { 
    text-align: center; 
    padding: 20px; 
    color: #2c3e50; 
    line-height: 1.4;
    overflow: hidden;
}
#main-date-display span {
    display: block;
    width: 100%;
}
.date-line-1 {
    font-size: 1.0em;
    font-weight: bold;
    color: #596a7a;
    margin-bottom: 4px;
}
.date-line-2 {
    font-size: 2.2em;
    font-weight: bold;
}

/* 天体情報 */
#celestial-static-wrapper { font-size: 0.9em; text-align: center; line-height: 1.6; }

/* 共通アコーディオン スタイル */
.accordion-item { border-bottom: 1px solid #eee; }
.info-section .accordion-item:last-child { border-bottom: none; }
.accordion-header { width: 100%; background: none; border: none; text-align: left; padding: 15px 5px; font-size: 1.1em; font-weight: bold; cursor: pointer; position: relative; color: #333; }
.accordion-header::after { content: '+'; position: absolute; right: 10px; font-size: 1.2em; color: var(--primary-color); transition: transform 0.3s ease; }
.accordion-header.active::after { transform: rotate(45deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; padding: 0 15px; }
.accordion-content p { margin-top: 0; padding-bottom: 15px; font-size: 0.9em; line-height: 1.7; }

/* 個別セクションのスタイル */
#history-info ul { list-style: none; padding: 0; }
#history-info li { background-color: #f8f9f9; padding: 10px; border-radius: 5px; margin-bottom: 8px; font-size: 0.9em; }
#history-info .year { font-weight: bold; margin-right: 10px; color: #555; }
#birth-info .accordion-header, #birthday-info .accordion-header { font-size: 1.0em; }

/* シェアボタン */
.share-buttons {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding-top: 15px;
    margin-bottom: 20px;
}
.info-section .share-buttons {
    margin-bottom: 0;
    margin-top: 15px;
}

.share-btn {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.75em;
    border: none;
    cursor: pointer;
}
.x-share { background-color: #000000; }
.line-share { background-color: #00B900; }
.facebook-share { background-color: #1877F2; }
.whatsapp-share { background-color: #25D366; }
.copy-link-btn { background-color: #6c757d; font-size: 1.1em; padding: 4px 12px; }

/* カレンダー */
#calendar-container { padding-top: 5px; }
#calendar-header { display: flex; justify-content: space-between; align-items: center; padding: 0 10px; }
#calendar-header button { background: none; border: none; font-size: 1.5em; cursor: pointer; }
#calendar-month-year { font-size: 1.1em; }
#calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
#calendar-grid .day-name { font-weight: bold; font-size: 0.8em; padding: 5px 0; }
#calendar-grid .day { padding: 10px 5px; cursor: pointer; border-radius: 50%;}
#calendar-grid .day:hover { background-color: #f0f0f0; }
#calendar-grid .day.saturday { color: #0000FF; font-weight: bold; }
#calendar-grid .day.sunday { color: #FF0000; font-weight: bold; }
#calendar-grid .day.today { background-color: var(--primary-color); color: white !important; }
#calendar-grid .day.selected { box-shadow: 0 0 0 2px var(--primary-color) inset; }
#calendar-grid .empty { visibility: hidden; }
#calendar-month-year { border-left: none; padding-left: 0; }

/* ランキング用のCSS */
#horoscope-ranking-info .accordion-header {
    display: flex;
    align-items: center;
    font-size: 1em;
    padding: 12px 5px;
}
#horoscope-ranking-info .accordion-item {
    background-color: #f8f9f9;
    border-radius: 4px;
    margin-bottom: 5px;
    border-bottom: none;
}
#horoscope-ranking-info .rank-1 { background-color: rgba(255, 215, 0, 0.15); }
#horoscope-ranking-info .rank-2 { background-color: rgba(192, 192, 192, 0.2); }
#horoscope-ranking-info .rank-3 { background-color: rgba(205, 127, 50, 0.15); }

.rank-number {
    font-weight: bold;
    color: #555;
    width: 50px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 15px;
    font-size: 1.1em;
}
#horoscope-ranking-info .rank-1 .rank-number { color: #e8b400; font-size: 1.3em; }
#horoscope-ranking-info .rank-2 .rank-number { color: #8d8d8d; font-size: 1.2em; }
#horoscope-ranking-info .rank-3 .rank-number { color: #b87333; }

.sign-glyph {
    margin-right: 10px;
    font-size: 1.5em;
    min-width: 1.5em;
    text-align: center;
}
.sign {
    font-weight: bold;
    color: var(--text-color);
}
.lucky-color {
    font-weight: bold;
    display: flex;
    align-items: center;
}
.color-chip {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin: 0 0.5em;
}

/* タイトル下の国名表示用のCSS */
.title-wrapper { display: flex; flex-direction: column; align-items: center; }
#country-display { font-size: 0.5em; font-weight: bold; color: white; background-color: rgba(0, 0, 0, 0.25); padding: 3px 6px; border-radius: 4px; text-transform: uppercase; align-self: flex-end; }
#main-date-display .weekday { white-space: nowrap; }
@media (max-width: 420px) { #main-date-display .date-year { display: block; } }
#dynamic-content-wrapper { min-height: 800px; }

@media (max-width: 500px) { 
    .share-btn { 
        padding: 5px 10px; 
        font-size: 0.7em; 
    }
    
    .copy-link-btn {
        font-size: 0.9em;
        padding: 5px 10px;
    }
}

#main-date-display .date-line-2 {
    white-space: nowrap;
    display: inline-block;
}

/* 占いの注意書き用スタイル */
#horoscope-note {
    font-size: 0.75em;
    color: #777;
    text-align: right;
    padding: 10px 5px 0 5px;
    line-height: 1.5;
    margin: 0;
}

/* 今日の深掘りコーナー */
#dig-deeper-content {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#dig-deeper-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    font-size: 1.1em;
}

#dig-deeper-content a {
    display: block;
    background-color: #f8f9f9;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s ease, transform 0.2s ease;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#dig-deeper-content a:hover {
    background-color: #eef4f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

#dig-deeper-content .dig-deeper-title {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    font-size: 1.05em;
    line-height: 1.4;
}

#dig-deeper-content .dig-deeper-prompt {
    font-size: 0.85em;
    color: var(--primary-color);
    text-align: right;
    display: block;
    font-weight: bold;
}