﻿/* --- Hero Section --- */

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 90px 1.5rem 3rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 2.5rem;
    margin-top: 0.5rem;
}

.hero-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.text-highlight {
    background: linear-gradient(to right, #fbbf24, #d97706);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
}

/* --- Fortune Form --- */
.form-card {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.card-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--primary-color);
    filter: blur(80px);
    opacity: 0.2;
    z-index: 0;
}

#fortune-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border-radius: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    outline: none;
    font-size: 1rem;
    transition: 0.3s;
}

    .form-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    }

.radio-group {
    display: flex;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.25rem;
}

.radio-label {
    flex: 1;
    position: relative;
    cursor: pointer;
    text-align: center;
}

    .radio-label input {
        position: absolute;
        opacity: 0;
    }

.radio-text {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: 0.2s;
}

.radio-label input:checked + .radio-text {
    background: var(--bg-body);
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.date-input-wrapper {
    width: 100%;
    cursor: pointer;
}

#display-date {
    width: 100%;
    cursor: pointer;
    text-align: center;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(to right, var(--primary-color), var(--primary-hover));
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

    .submit-btn:hover {
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    }

    .submit-btn:active {
        transform: scale(0.98);
    }
/* =========================================
         5. Preview Sections (资讯与商城预览)
         ========================================= */
.previews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
}

@media (min-width: 768px) {
    .previews-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    font-family: 'Noto Serif SC', serif;
}

.section-more {
    font-size: 12px;
    color: var(--primary);
}

/* News List Styles */
.news-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

    .news-item:hover {
        background: var(--bg-input);
    }

.news-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #ccc;
}

.news-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Shop Grid Styles */
.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.shop-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

    .shop-item:hover {
        transform: translateY(-3px);
    }

.shop-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #eee;
}

.shop-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-price {
    color: var(--primary-hover);
    font-weight: bold;
    font-size: 14px;
}

.shop-item-sm {
    text-align: center;
    cursor: pointer;
}
/* Modified for 4:3 Aspect Ratio */
.shop-img-wrapper {
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background: rgba(0,0,0,0.05);
    aspect-ratio: 4 / 3;
    
}

.shop-item-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.shop-item-sm:hover img {
    opacity: 1;
}

.shop-item-sm h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- Loading View --- */
#view-loading {
    display: none;
    align-items: center;
    justify-content: center;
    height: 60vh;
    text-align: center;
    flex-direction: column;
}

.bagua-spinner {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-border {
    position: absolute;
    inset: 0;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-center {
    font-family: 'Noto Serif SC';
    font-size: 2rem;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* --- Result View --- */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: 0.2s;
}

    .outline-btn:hover {
        background: var(--bg-card);
        color: var(--text-main);
        border-color: var(--text-secondary);
    }

.bazi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card-heading {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
}

.bazi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.bazi-col {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.75rem 0.25rem;
}

    .bazi-col.highlight {
        background: rgba(245, 158, 11, 0.1);
        border-color: rgba(245, 158, 11, 0.3);
    }

        .bazi-col.highlight .bazi-val {
            color: var(--primary-color);
        }

.bazi-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.bazi-val {
    display: block;
    font-family: 'Noto Serif SC', serif;
    font-size: 1.25rem;
    font-weight: 600;
}

.bazi-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.yin-yang-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.balance-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.balance-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
}

    .analysis-card h3 {
        font-weight: 700;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .analysis-card p {
        font-size: 0.9rem;
        line-height: 1.6;
        color: var(--text-secondary);
    }

.lucky-section {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

    .lucky-section h3 {
        font-family: 'Noto Serif SC';
        font-weight: 700;
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

.lucky-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

    .badge strong {
        color: var(--text-main);
        margin-left: 0.25rem;
    }

.lucky-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.lucky-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

    .lucky-item img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        margin-bottom: 0.5rem;
        border: 2px solid var(--border-color);
    }

    .lucky-item h5 {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.1rem;
    }

    .lucky-item span {
        font-size: 0.65rem;
        color: var(--primary-color);
    }



/* --- Date Picker Modal (Custom Drum) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.picker-container {
    width: 100%;
    max-width: 400px;
    background: var(--bg-nav);
    border-radius: 1.5rem 1.5rem 0 0;
    overflow: hidden;
    animation: slideUp 0.3s;
    border: 1px solid var(--border-color);
}

@media (min-width: 640px) {
    .modal-overlay {
        align-items: center;
    }

    .picker-container {
        border-radius: 1rem;
    }
}

.picker-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

    .picker-header button {
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 0.9rem;
        cursor: pointer;
        padding: 0.5rem;
    }

    .picker-header span {
        font-weight: 700;
        color: var(--text-main);
        padding: 0.5rem;
    }

.confirm-text {
    color: var(--primary-color) !important;
    font-weight: 700;
}

.picker-body {
    height: 300px;
    position: relative;
    display: flex;
    justify-content: center;
    background: var(--bg-body);
}

.picker-highlight {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 40px;
    margin-top: -20px;
    background: var(--picker-highlight);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    pointer-events: none;
    z-index: 10;
}

.picker-mask-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, var(--bg-body), transparent);
    pointer-events: none;
    z-index: 10;
}

.picker-mask-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, var(--bg-body), transparent);
    pointer-events: none;
    z-index: 10;
}

.picker-columns {
    display: flex;
    width: 100%;
    height: 100%;
    z-index: 5;
}
/* Picker Column: Enable Grab Cursor and Scroll Snap */
.picker-col {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    text-align: center;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
}

    .picker-col:active {
        cursor: grabbing;
    }

    .picker-col::-webkit-scrollbar {
        display: none;
    }

.picker-pad {
    height: 80px;
    flex-shrink: 0;
}

.picker-item {
    height: 40px;
    line-height: 40px;
    scroll-snap-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: transform 0.2s, color 0.2s;
    cursor: pointer;
}
    /* Hover effect for items to indicate interactivity */
    .picker-item:hover {
        color: var(--text-main);
    }
