@layer utilities {
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    .text-shadow-lg {
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    }
    .bg-glass {
        background: rgba(30, 41, 59, 0.7);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .btn-3d {
        position: relative;
        transition: all 0.2s ease;
        transform-style: preserve-3d;
    }
    .btn-3d:before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        background: rgba(0, 0, 0, 0.2);
        transform: translateZ(-1px) scale(0.9);
        filter: blur(10px);
        border-radius: inherit;
        transition: all 0.2s ease;
    }
    .btn-3d:hover {
        transform: translateY(-3px);
    }
    .btn-3d:hover:before {
        transform: translateZ(-1px) scale(0.85);
        filter: blur(15px);
    }
    .btn-3d:active {
        transform: translateY(0);
    }
    .btn-3d:active:before {
        transform: translateZ(-1px) scale(0.95);
        filter: blur(5px);
    }

    .time-selector {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #e5e7eb;
        border-radius: 0.375rem;
        background: white;
        padding: 0.125rem 0.25rem;
        box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.05);
        height: 2.25rem;
        min-width: 200px;
    }
    /* Hide scrollbar but allow scrolling */
    .time-selector::-webkit-scrollbar {
        display: none;
    }
    .time-selector {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .time-options {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    .time-selector > .time-options > div {
        padding: 0.25rem 0.5rem;
        text-align: center;
        color: #4b5563;
        font-weight: 400;
        cursor: pointer;
        transition: all 0.15s ease;
        line-height: 1.2;
        user-select: none;
        min-width: 30px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.25rem;
        font-size: 0.8125rem;
        background: transparent;
    }
    .time-selector > .time-options > div:hover {
        color: #7c3aed;
        font-weight: 500;
        transform: translateY(-1px);
    }
    .time-selector > .time-options > div.font-bold.text-primary {
        color: #7c3aed;
        font-weight: 700;
        background: transparent;
    }
    /* 在大屏幕上放大时间选择器 */
    @media (min-width: 768px) {
        .time-selector {
            height: 2.75rem;
            padding: 0.25rem 0.5rem;
        }
        .time-selector > .time-options > div {
            font-size: 0.9375rem;
            padding: 0.375rem 0.75rem;
            min-width: 40px;
        }
    }
    
    /* 年份选项特殊样式 - 增加内边距解决拥挤问题 */
    #yearOptions > div {
        padding: 0.25rem 0.75rem !important;
        min-width: 45px;
    }
    .gender-btn.active {
        background-color: #FFD700;
        color: #333;
    }
    .location-tab.active {
        border-bottom: 2px solid #333;
        color: #333;
    }
    /* .time-unit class removed as we're using flex layout now */
    /* Removed #yearSelector specific width to match other selectors */
    .time-value {
        font-size: 0.85rem;
        font-weight: 600;
        color: white;
        padding: 0.5rem 0.75rem;
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        border-radius: 0.375rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        width: 60px;
        text-align: center;
    }
    .time-label {
        font-size: 0.75rem;
        color: #718096;
        font-weight: 500;
        width: 40px;
        text-align: left;
        padding-right: 4px;
    }
}

body {
    overflow-x: hidden;
}
/* 折叠容器样式 */
#birthInfoContent {
    transition: all 0.3s ease;
    overflow: hidden;
}
#birthInfoContent.collapsed {
    max-height: 0;
    padding: 0;
    opacity: 0;
}
#birthInfoContent.expanded {
    max-height: 1000px;
    opacity: 1;
}
#toggleIcon {
    transition: transform 0.3s ease;
}
#toggleIcon.rotated {
    transform: rotate(180deg);
}

/* 八字信息布局样式 */
.bazi-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}

.card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 2px 0;
    border-left: 3px solid #d4af37;
    padding-left: 4px;
    line-height: 1.2;
}

.highlight { color: #d4af37; font-weight: 600; font-size: 14px; }
.bazi-code { font-family: monospace; letter-spacing: 1px; font-size: 14px; font-weight: normal; }
.base-content, .cycle-content {
    font-size: 14px;
    color: #333;
}

.tags { display: flex; flex-wrap: wrap; gap: 1px; }
.patterns-tags { flex-direction: column; }
.patterns-tags .tag { display: block; width: 100%; margin-bottom: 1px; background: transparent; }
.tag {
    padding: 0px 4px;
    background: #f5f5f5;
    border-radius: 14px;
    font-size: 13px;
    color: #333;
    line-height: 1.1;
}
.tag.with-icon {
    background: #f0f8fb;
    color: #4299e1;
    display: flex;
    align-items: center;
    gap: 3px;
}
.icon-blessing {
    width: 12px;
    height: 12px;
    background-color: #4299e1;
    border-radius: 50%;
    display: inline-block;
}

.god-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.god.good { color: #48bb78; font-weight: 600; font-size: 14px; }
.god.bad { color: #e53e3e; font-weight: 600; font-size: 14px; }

.strength-level {
    font-size: 20px;
    font-weight: 700;
    color: #d4af37;
    margin: 2px 0;
}
.note {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}