﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /*background: linear-gradient(135deg, #667eea, #764ba2);*/
    background: #667eea;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

    header h1 {
        font-size: 2.5em;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }

    header p {
        font-size: 1.2em;
        opacity: 0.9;
    }

/* วงกลมจักรราศี - รองรับทั้ง PC และมือถือ */
.zodiac-circle-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
}

.zodiac-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: rgba(255,255,255,0.1);
    border: 3px solid rgba(255,255,255,0.3);
    transition: transform 0.5s ease;
}

.zodiac-sign {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: center;
    /* ปรับตำแหน่งให้อยู่กึ่งกลาง */
    margin-left: -20px;
    margin-top: -20px;
}

    .zodiac-sign:hover {
        transform: scale(1.2);
        z-index: 10;
    }

    .zodiac-sign.active {
        transform: scale(1.3);
        box-shadow: 0 0 20px rgba(255,255,255,0.8);
        z-index: 15;
    }

.center-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.current-zodiac .zodiac-icon {
    font-size: 2em;
    margin-bottom: 5px;
}

.current-zodiac .zodiac-name {
    font-weight: bold;
    font-size: 1.1em;
}

.current-zodiac .zodiac-element {
    font-size: 0.9em;
    opacity: 0.8;
}

/* แจ้งเตือน */
.today-alert {
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

    .today-alert h3 {
        margin-bottom: 10px;
        color: #444;
    }

    .today-alert p {
        font-size: 1.1em;
        line-height: 1.6;
    }

/* กราฟ 7 วัน */
.week-chart {
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

    .week-chart h3 {
        text-align: center;
        margin-bottom: 20px;
        color: #444;
    }

.week-days {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    overflow-x: auto;
    padding: 10px 0;
}

.day-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 15px 10px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

    .day-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .day-item.today {
        border-color: #007bff;
        background: #e3f2fd;
    }

.day-date {
    font-weight: bold;
    margin-bottom: 5px;
}

.day-zodiac {
    font-size: 1.5em;
    margin: 10px 0;
}

.day-planet {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 10px;
}

.day-activities {
    font-size: 1.2em;
    margin-top: 10px;
}

.influence-bar {
    margin-top: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
    height: 4px;
}

/* กราฟความแรงอิทธิพล */
.influence-chart {
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    min-height: 450px; /* เพิ่มความสูงของ container */
}

#influenceCanvas {
    max-width: 100%;
    height: 400px !important; /* บังคับความสูง */
}

/* ส่วนท้าย */
footer {
    background: rgba(255,255,255,0.9);
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
}

.philosophy {
    margin-bottom: 30px;
}

    .philosophy h4 {
        margin-bottom: 15px;
        color: #444;
        font-size: 1.3em;
    }

    .philosophy h5 {
        margin-bottom: 10px;
        color: #555;
        font-size: 1.1em;
    }

    .philosophy p {
        line-height: 1.6;
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    .philosophy ul {
        margin-bottom: 15px;
    }

    .philosophy li {
        margin-bottom: 5px;
    }

.accuracy-info h4 {
    margin-bottom: 20px;
    color: #444;
    font-size: 1.3em;
}

.accuracy-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.accuracy-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.accuracy-total {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #007bff;
    color: white;
    border-radius: 8px;
    font-weight: bold;
}

.percentage {
    font-weight: bold;
}

    .percentage.total {
        font-size: 1.2em;
    }

.method-description {
    line-height: 1.6;
    font-size: 1em;
    margin-top: 15px;
}

/* Responsive สำหรับมือถือ */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2em;
    }

    .zodiac-circle-container {
        width: 280px;
        height: 280px;
    }

    .zodiac-sign {
        width: 35px;
        height: 35px;
        font-size: 1.3em;
        margin-left: -17.5px;
        margin-top: -17.5px;
    }

    .center-info {
        width: 100px;
        height: 100px;
        padding: 15px;
    }

    .current-zodiac .zodiac-icon {
        font-size: 1.8em;
    }

    .current-zodiac .zodiac-name {
        font-size: 1em;
    }

    .current-zodiac .zodiac-element {
        font-size: 0.8em;
    }

    .week-days {
        gap: 8px;
    }

    .day-item {
        min-width: 70px;
        padding: 8px 4px;
    }

    .day-date {
        font-size: 0.8em;
    }

    .day-zodiac {
        font-size: 1.3em;
    }

    .day-planet {
        font-size: 0.7em;
    }

    .day-activities {
        font-size: 1em;
    }

    .accuracy-breakdown {
        grid-template-columns: 1fr;
    }

    #influenceCanvas {
        width: 100%;
        height: 150px;
    }

    .today-alert h3 {
        font-size: 1.1em;
    }

    .today-alert p {
        font-size: 1em;
    }

    .week-chart h3 {
        font-size: 1.1em;
    }

    .philosophy h4,
    .accuracy-info h4 {
        font-size: 1.2em;
    }

    .philosophy p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .zodiac-circle-container {
        width: 250px;
        height: 250px;
    }

    .zodiac-sign {
        width: 30px;
        height: 30px;
        font-size: 1.1em;
        margin-left: -15px;
        margin-top: -15px;
    }

    .center-info {
        width: 80px;
        height: 80px;
        padding: 10px;
    }

    .current-zodiac .zodiac-icon {
        font-size: 1.5em;
    }

    .current-zodiac .zodiac-name {
        font-size: 0.9em;
    }

    .current-zodiac .zodiac-element {
        font-size: 0.7em;
    }

    .week-days {
        flex-wrap: wrap;
        gap: 10px;
    }

    .day-item {
        flex: 0 0 calc(50% - 5px);
        min-width: auto;
    }
}
