:root {
    --bg-dark: #0a0a0f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-1: #8a2be2;
    --accent-2: #4169e1;
    --accent-3: #00ffff;
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans TC', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    /* 防拷貝：禁止選取文字 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 允許輸入框可以選中文字（否則無法打字） */
input, textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #13131f 0%, #0a0a0f 100%);
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: drift 20s infinite alternate ease-in-out;
}

.glow-1 {
    background: radial-gradient(circle, var(--accent-1), transparent 70%);
    top: -200px;
    left: -200px;
}

.glow-2 {
    background: radial-gradient(circle, var(--accent-2), transparent 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* Container */
.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    margin: auto 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
}

.hero {
    text-align: center;
    animation: fadeInDown 1s ease-out;
}

.title {
    font-family: var(--font-body), var(--font-heading), sans-serif;
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.title .highlight {
    font-family: var(--font-heading), sans-serif;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-3), var(--accent-1));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.input-section {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.input-section:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(138, 43, 226, 0.2);
}

/* Tabs */
.tabs-section {
    display: flex;
    justify-content: center;
    margin-bottom: -1rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.3rem;
    gap: 0.3rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.4), rgba(65, 105, 225, 0.4));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Global Hidden Helper */
.hidden {
    display: none !important;
}

.hidden-mode {
    display: none !important;
}

/* Form Elements */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
}

input[type="date"], input[type="text"], input[type="tel"] {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

input[type="date"], input[type="tel"] {
    cursor: pointer;
}

input[type="text"] {
    text-transform: uppercase;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1rem;
    font-family: var(--font-body);
    text-transform: none;
}

.input-hint {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: -0.5rem;
    opacity: 0.7;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
}

.input-with-icon input {
    padding-left: 3rem;
    width: 100%;
}

/* Clearable Input */
.input-clearable {
    position: relative;
    display: flex;
    align-items: center;
}

.input-clearable input {
    padding-right: 3rem;
}

.input-clear-btn {
    position: absolute;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
    z-index: 2;
}

.input-clear-btn i {
    width: 14px;
    height: 14px;
}

.input-clear-btn:hover {
    background: rgba(255, 62, 73, 0.15);
    color: #ff6b6b;
    border-color: rgba(255, 62, 73, 0.3);
    transform: scale(1.1);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.5;
    letter-spacing: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 1rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input[type="date"]:focus, input[type="text"]:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border: none;
    border-radius: 12px;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    font-family: var(--font-body);
    white-space: nowrap;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(65, 105, 225, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

/* Results Section */
.result-section {
    transition: all 0.5s ease;
}

.result-section.hidden {
    opacity: 0;
    display: none;
    transform: translateY(20px);
}

.result-section.visible {
    animation: fadeInUp 0.8s ease-out forwards;
    display: block;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-header h2 {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.number-display {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(255,255,255,0.1);
    animation: pulseGlow 2s infinite alternate;
}

.gradient-text {
    background: linear-gradient(to right, var(--accent-3), var(--accent-1));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

#traits-desc {
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.trait-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.trait-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.trait-box h4 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trait-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 易經八星流動特效 */
.glass-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 2.5rem 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.energy-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(145deg, rgba(30, 30, 42, 0.7), rgba(15, 15, 23, 0.9));
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.flow-node::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    opacity: 0.5;
}

.flow-node:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 節點吉凶高光與邊框特效 */
.node-good { border-bottom: 2px solid #00E676; }
.node-bad { border-bottom: 2px solid #FF1744; }

.node-good:hover { box-shadow: 0 10px 30px rgba(0, 230, 118, 0.15); }
.node-bad:hover { box-shadow: 0 10px 30px rgba(255, 23, 68, 0.15); }

.flow-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.flow-star {
    font-size: 0.95rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.star-icon {
    width: 14px;
    height: 14px;
}

.flow-arrow {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    animation: flowPulse 2s infinite ease-in-out;
}

.flow-arrow i {
    width: 24px;
    height: 24px;
}

.star-good { 
    background: rgba(0, 230, 118, 0.1); 
    color: #00E676; 
    border: 1px solid rgba(0, 230, 118, 0.2); 
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.star-bad { 
    background: rgba(255, 23, 68, 0.1); 
    color: #FF1744; 
    border: 1px solid rgba(255, 23, 68, 0.2); 
    text-shadow: 0 0 10px rgba(255, 23, 68, 0.4);
}

.diagnosis-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border-left: 4px solid var(--accent-1);
    padding: 1.8rem;
    border-radius: 0 16px 16px 0;
    margin-top: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.diagnosis-title {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.diagnosis-title i {
    color: var(--accent-1);
}

.diagnosis-box p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
}

.solution-list {
    margin: 1rem 0;
    padding-left: 1.2rem;
    list-style-type: none;
}

.solution-list li {
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    position: relative;
    font-size: 0.95rem;
}

.solution-list li::before {
    content: '✦';
    position: absolute;
    left: -1.2rem;
    color: var(--accent-1);
}

.solution-list li strong {
    color: var(--accent-1);
}

.diag-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 0.8rem;
    margin-top: 0.8rem;
    font-style: italic;
    font-size: 0.9rem !important;
}

/* Timeline Styles - Detailed List View */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.timeline-detail-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
}

.timeline-detail-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.sub-diag-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-2);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.biz-analysis, .car-analysis {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.biz-analysis p, .car-analysis p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.highlight-p { color: #f9ca24; }
.warning-p { color: #ff7979; }
.safe-p { color: #6ab04c; }

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.fortune-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.fortune-pair {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.fortune-star {
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
}

.fortune-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
    font-style: italic;
}

.age-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-1);
    background: rgba(108, 92, 231, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 8px;
}

/* Modal Styles Refined */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 20, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal-content {
    max-width: 420px;
    width: 85%;
    padding: 3rem 2rem;
    position: relative;
    text-align: center;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 243, 255, 0.15);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 62, 73, 0.1);
    color: #ff3e49;
    border-color: rgba(255, 62, 73, 0.3);
    transform: rotate(90deg);
}

.modal-icon-container {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
}

.modal-icon-container i {
    width: 40px;
    height: 40px;
}

#modal-star-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.modal-desc {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
    font-weight: 400;
}

/* Share Section */
.share-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.share-title {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.share-title i {
    width: 18px;
    height: 18px;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.share-btn i, .share-btn svg {
    width: 18px;
    height: 18px;
}

.share-line:hover {
    background: rgba(6, 199, 85, 0.2);
    border-color: #06c755;
}

.share-fb:hover {
    background: rgba(24, 119, 242, 0.2);
    border-color: #1877f2;
}

.share-copy:hover {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--accent-1);
}

.share-btn.copied {
    background: rgba(0, 255, 136, 0.15);
    border-color: #00ff88;
    color: #00ff88;
}

/* History Section */
.history-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.history-title {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.history-input {
    color: var(--text-primary);
    font-family: var(--font-body);
}

.history-result {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.history-clear {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: color 0.2s;
}

.history-clear:hover {
    color: #ff3e49;
}

/* Animations Logic */
@keyframes spin { to { transform: rotate(360deg); } }
.spin-anim { animation: spin 1s linear infinite; }
@keyframes flowPulse {
    0%, 100% { transform: translateX(0); opacity: 0.4; }
    50% { transform: translateX(4px); opacity: 0.8; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .title { font-size: 3rem; }
    .grid-container { grid-template-columns: 1fr; }
    .energy-flow { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    .flow-arrow { transform: rotate(90deg); margin: 0.5rem 0; }
}

@media (max-width: 480px) {
    .container { padding: 0.75rem; }
    .title { font-size: 2.2rem; }
    .subtitle { font-size: 0.95rem; }
    .glass-panel { padding: 1.2rem; }
    .number-display { font-size: 3.5rem; }
    .tab-btn { padding: 0.6rem 1rem; font-size: 0.9rem; }
    .tabs { padding: 0.2rem; gap: 0.2rem; }
    .btn-primary { padding: 0.9rem 1.5rem; font-size: 1rem; }
    input[type="date"], input[type="text"] { font-size: 1rem; padding: 0.8rem 1.2rem; }
    .input-with-icon input { padding-left: 2.5rem; }
    .input-clearable input { padding-right: 2.5rem; }
    .input-icon { left: 0.75rem; width: 18px; height: 18px; }
    .input-clear-btn { right: 0.5rem; width: 24px; height: 24px; }
    .input-clear-btn i { width: 12px; height: 12px; }
    label { font-size: 1rem; }
    .input-hint { font-size: 0.85rem; }
    .timeline-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .fortune-badge-wrapper { width: 100%; justify-content: space-between; }
    .gradient-text { font-size: 1.4rem; }
    .section-subtitle { font-size: 0.85rem; }
    .diagnosis-box { padding: 1.2rem; }
    .modal-content { width: 92%; padding: 2rem 1.5rem; }
    #modal-star-name { font-size: 1.6rem; }
    .modal-desc { font-size: 1.05rem; }
    .site-footer { font-size: 0.75rem; padding: 1.5rem 0.5rem; }
}

@media (max-width: 360px) {
    .container { padding: 0.5rem; }
    .title { font-size: 1.8rem; }
    .subtitle { font-size: 0.85rem; }
    .glass-panel { padding: 1rem; border-radius: 14px; }
    .tab-btn { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
    .btn-primary { font-size: 0.9rem; padding: 0.8rem 1rem; }
    input[type="date"], input[type="text"] { font-size: 0.9rem; padding: 0.7rem 1rem; }
    .flow-node { padding: 0.8rem 1rem; }
    .flow-number { font-size: 1.4rem; }
    .flow-star { font-size: 0.8rem; padding: 0.2rem 0.6rem; }
    .number-display { font-size: 3rem; }
    .gradient-text { font-size: 1.2rem; }
    .modal-content { width: 95%; padding: 1.5rem 1rem; }
}
