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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    padding: 40px 20px;
    color: #333;
}

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

.header {
    position: relative;
    text-align: center;
    margin-bottom: 50px;
    color: white;
}

.header-action-link {
    position: absolute;
    top: 4px;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    font-size: 0.85em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.header-action-link:hover {
    background: rgba(255, 255, 255, 0.25);
}

.header-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
    letter-spacing: 1px;
}

.week-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.day-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.day-card.is-today {
    border: 2px solid #667eea;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35);
}

.day-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.day-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.day-date {
    font-size: 0.9em;
    color: #999;
}

.card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.card-action-btn {
    background: none;
    border: 1px solid #e0e0e0;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    color: #666;
    font-size: 0.85em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.card-action-btn i {
    font-size: 1.1em;
}

.card-action-btn:hover {
    background: #f0f0f0;
    color: #667eea;
}

.card-action-btn.copied {
    color: #4caf50;
}

.celestial-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.celestial-body {
    flex: 1;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.celestial-body.moon {
    border-left-color: #764ba2;
}

.body-label {
    font-size: 0.85em;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.moon .body-label {
    color: #764ba2;
}

.gate-info {
    margin-bottom: 8px;
}

.gate-number {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.gate-line {
    font-size: 0.65em;
    font-weight: 500;
    color: #999;
    vertical-align: middle;
}

.gate-name {
    font-size: 0.95em;
    font-weight: 700;
    color: #666;
    margin-bottom: 5px;
}

.gate-center {
    font-size: 0.9em;
    color: #999;
    font-style: italic;
}

.longitude {
    font-size: 0.8em;
    color: #aaa;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.active-centers {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.centers-label {
    font-size: 0.85em;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.center-badge {
    display: inline-block;
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    color: #667eea;
    border: 1px solid #667eea;
    margin-right: 8px;
    margin-bottom: 8px;
}

.gate-hint {
    font-size: 0.92em;
    color: #555;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    line-height: 1.5;
}

.week-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 0 24px;
    color: white;
}

.week-nav-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.type-selector {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 30px;
    text-align: center;
}

.type-label {
    color: white;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    opacity: 0.75;
}

.type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.type-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.type-btn.active {
    background: white;
    color: #302b63;
    border-color: white;
    font-weight: 600;
}

.summary {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.summary h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

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

.summary-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.summary-item-title {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-item-content {
    color: #333;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }

    .header-action-link {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    .help-content {
        padding: 20px;
    }

    .week-grid {
        grid-template-columns: 1fr;
    }

    .day-card {
        padding: 20px;
    }

    .celestial-row {
        flex-direction: column;
    }

    .week-nav {
        display: grid;
        grid-template-columns: max-content;
        justify-content: center;
        gap: 10px;
    }

    .week-nav-dates {
        gap: 10px;
    }

    #goto-today {
        width: 100%;
        justify-content: center;
    }

    #week-range {
        font-size: 0.9em;
        white-space: nowrap;
    }
}

@media (max-width: 575px) {
    .day-header {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .card-actions {
        width: 100%;
        justify-content: center;
    }
}

.info-note {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 0.95em;
    line-height: 1.5;
}

.info-note-sub {
    display: block;
    margin-top: 10px;
    font-size: 0.88em;
    opacity: 0.65;
    line-height: 1.6;
}

.info-note a {
    color: inherit;
    text-decoration: underline;
}

.help-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.help-section + .help-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}

.help-section h2 {
    font-size: 1.25em;
    color: #333;
    margin-bottom: 14px;
}

.help-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.help-section p:last-child {
    margin-bottom: 0;
}

.help-note {
    font-size: 0.9em;
    color: #888 !important;
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    padding: 12px 15px;
    border-radius: 8px;
}

.help-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.help-type-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.help-type-name {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 6px;
}

.help-type-item p {
    font-size: 0.9em;
    margin-bottom: 0;
}

.help-list {
    color: #555;
    line-height: 1.7;
    padding-left: 20px;
}

.help-list li {
    margin-bottom: 10px;
}

.help-list li:last-child {
    margin-bottom: 0;
}

i[class^="ph"] {
    vertical-align: middle;
}

.header h1 i {
    font-size: 0.85em;
}

.body-label i,
.centers-label i,
.info-note i {
    margin-right: 5px;
}

.today-badge i {
    font-size: 0.85em;
}

.site-footer {
    text-align: center;
    margin-top: 48px;
    padding: 28px 0 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88em;
    line-height: 1.9;
}

.footer-made {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95em;
}

.footer-made strong {
    color: white;
    letter-spacing: 0.03em;
}

.footer-version {
    font-size: 0.8em;
    opacity: 0.5;
    margin-left: 6px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: white;
}

.footer-dot {
    margin: 0 8px;
    opacity: 0.4;
}

.footer-privacy {
    margin-top: 14px;
    font-size: 0.8em;
    opacity: 0.35;
}

.bmc-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 9px 20px;
    background: #FFDD00;
    color: #000;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}

.bmc-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}
