﻿/* ZodiacFarm.css - WebView Compatible Version */
/* เกษตรจักรวาล - การวิเคราะห์ทางดาราศาสตร์ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Kanit', sans-serif;
    background: #667eea;
    color: white;
    min-height: 100vh;
    padding: 15px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.subtitle {
    text-align: center;
    opacity: 0.9;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

    .btn:hover {
        transform: translateY(-2px);
    }

.date-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    justify-content: center;
}

.calendar-row {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.energy-display {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.energy-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: #333;
    flex-shrink: 0;
}

.energy-score {
    font-size: 1.8rem;
    font-weight: bold;
}

.energy-emoji {
    font-size: 1.2rem;
}

.energy-details {
    flex: 1;
    font-size: 0.95rem;
}

.planetary-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.planet-box {
    background: rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.85rem;
}

.planet-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.aspect-item {
    background: rgba(255,255,255,0.15);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.aspect-conjunction {
    border-left-color: #2196f3;
}

.aspect-opposition {
    border-left-color: #f44336;
}

.aspect-trine {
    border-left-color: #4caf50;
}

.aspect-square {
    border-left-color: #ff9800;
}

.aspect-sextile {
    border-left-color: #9c27b0;
}

.aspect-header {
    font-weight: bold;
    font-size: 1.05rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aspect-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.aspect-agriculture {
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    padding: 8px;
    border-radius: 6px;
    font-style: italic;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.grid-item {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 12px;
    transition: transform 0.2s ease;
    border-left: 4px solid;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

    .grid-item:hover {
        transform: translateY(-3px);
        background: rgba(255,255,255,0.25);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

.plant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.plant-name {
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    color: #ffffff;
}

.plant-score {
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.plant-reasoning {
    font-size: 0.85rem;
    opacity: 0.95;
    background: rgba(0,0,0,0.2);
    color: rgba(255,255,255,0.9);
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
    line-height: 1.4;
}

.hidden {
    display: none;
}

.status {
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
}

.excellent {
    border-left-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.good {
    border-left-color: #8bc34a;
    background: rgba(139, 195, 74, 0.1);
}

.average {
    border-left-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.poor {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.avoid {
    border-left-color: #9c27b0;
    background: rgba(156, 39, 176, 0.1);
}

.methodology {
    background: rgba(0,0,0,0.3);
    color: rgba(255,255,255,0.95);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 0.9rem;
    border-left: 4px solid #2196f3;
    line-height: 1.5;
}

.btn-small {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

    .btn-small:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }

    .btn-small.active {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        border-color: rgba(255,255,255,0.3);
        box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
    }

.date-input {
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 150px;
}

    .date-input::-webkit-calendar-picker-indicator {
        filter: invert(1);
        cursor: pointer;
    }

.selected-date {
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 15px;
}

.star-saying {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid;
}

    .star-saying.danger {
        border-left-color: #f44336;
        background: rgba(244, 67, 54, 0.1);
    }

    .star-saying.warning {
        border-left-color: #ff9800;
        background: rgba(255, 152, 0, 0.1);
    }

    .star-saying.good {
        border-left-color: #4caf50;
        background: rgba(76, 175, 80, 0.1);
    }

    .star-saying.neutral {
        border-left-color: #2196f3;
        background: rgba(33, 150, 243, 0.1);
    }

.saying-header {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.saying-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.small-text {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ส่วนปรัชญาใหม่ - แบบพื้นๆ สำหรับ WebView */
.philosophy-section {
    background-color: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.2);
}

.philosophy-content {
    margin: 0;
}

/* Progress Bar แบบพื้นๆ */
.accuracy-box {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.accuracy-comparison {
    margin: 15px 0;
}

.accuracy-item {
    margin-bottom: 15px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.accuracy-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.accuracy-bar {
    position: relative;
    width: 100%;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin: 10px 0;
}

.accuracy-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 13px;
}

    .accuracy-fill.full {
        width: 100%;
        background-color: #4caf50;
    }

    .accuracy-fill.partial {
        width: 70%;
        background-color: #ff9800;
    }

.accuracy-percent {
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -10px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    line-height: 20px;
}

.accuracy-note {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
    font-style: italic;
    line-height: 1.4;
}

.influence-hierarchy {
    margin: 20px 0;
}

.influence-item {
    display: block;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

    .influence-item.primary {
        background-color: rgba(76, 175, 80, 0.2);
        border-left-color: #4caf50;
    }

    .influence-item.secondary {
        background-color: rgba(255, 152, 0, 0.2);
        border-left-color: #ff9800;
    }

.influence-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    margin-right: 15px;
    vertical-align: top;
}

.influence-content {
    display: inline-block;
    width: calc(100% - 50px);
    vertical-align: top;
}

    .influence-content p {
        margin: 5px 0 0 0;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.4;
    }

.disclaimer {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid #f44336;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

    .disclaimer ul {
        margin: 10px 0 0 20px;
        padding: 0;
    }

    .disclaimer li {
        margin-bottom: 8px;
        font-size: 14px;
        line-height: 1.4;
    }

.philosophy-text {
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 20px;
}

    .philosophy-text p {
        margin-bottom: 15px;
        line-height: 1.6;
    }

.philosophy-credit {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }

    .card {
        padding: 15px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .planetary-data {
        grid-template-columns: repeat(3, 1fr);
    }

    .energy-display {
        flex-direction: column;
        text-align: center;
    }

    .date-controls {
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .btn-small {
        font-size: 0.8rem;
        padding: 6px 12px;
        min-width: 70px;
    }

    .date-input {
        font-size: 0.8rem;
        min-width: 130px;
    }

    .calendar-row {
        margin-bottom: 10px;
    }

    h1 {
        font-size: 1.5rem;
    }

    /* Mobile สำหรับ Progress Bar */
    .accuracy-box {
        padding: 15px;
        margin: 15px 0;
    }

    .accuracy-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .accuracy-label {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .accuracy-bar {
        height: 25px;
        margin: 8px 0;
    }

    .accuracy-percent {
        font-size: 13px;
        right: 8px;
        margin-top: -8px;
        line-height: 16px;
    }

    .influence-item {
        padding: 12px;
    }

    .influence-number {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 13px;
        margin-right: 10px;
    }

    .influence-content {
        width: calc(100% - 40px);
    }

        .influence-content p {
            font-size: 13px;
        }

    .philosophy-text {
        padding: 15px;
        text-align: left;
    }

    .disclaimer li {
        font-size: 13px;
    }
}
