:root {
    --bg-dark: #121212;
    --bg-light: #f8f9fa;
    --text-dark: #121212;
    --text-light: #f8f9fa;
    --primary: #404040;
    --secondary: #757575;
    --accent: #e0e0e0;
    --card-bg-dark: rgba(30, 30, 30, 0.7);
    --card-bg-light: rgba(255, 255, 255, 0.7);
    --blur-effect: 10px;
    --transition-speed: 0.3s;
    --card-border-dark: rgba(255, 255, 255, 0.1);
    --card-border-light: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    background-image: linear-gradient(to bottom right, #121212, #2d2d2d);
    background-attachment: fixed;
    background-size: cover;
    -ms-overflow-style: none;
}

.bg-dark {
    background-image: linear-gradient(to bottom right, #121212, #2d2d2d);
    color: var(--text-light);
}

.bg-light {
    background-image: linear-gradient(to bottom right, #e0e0e0, #f8f9fa);
    color: var(--text-dark);
}

.text-light {
    color: var(--text-light);
}

.text-dark {
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(var(--blur-effect));
    -webkit-backdrop-filter: blur(var(--blur-effect));
    border-radius: 12px;
    border: 1px solid var(--card-border-dark);
    margin-bottom: 2rem;
    animation: slideIn 0.6s ease-out;
    transition: all 0.4s ease;
}

.header:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.bg-light .header {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--card-border-light);
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.search-container {
    display: flex;
    align-items: center;
}

#searchInput {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--secondary);
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    color: inherit;
    margin-right: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.215, 0.610, 0.355, 1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.bg-light #searchInput {
    background-color: rgba(255, 255, 255, 0.5);
}

#searchInput:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
}

#themeToggle {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--transition-speed);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.bg-light #themeToggle {
    background: rgba(255, 255, 255, 0.5);
}

#themeToggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(var(--blur-effect));
    -webkit-backdrop-filter: blur(var(--blur-effect));
    border-radius: 12px;
    border: 1px solid var(--card-border-dark);
    animation: slideIn 0.7s ease-out;
    transition: all 0.4s ease;
}

.filters:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.bg-light .filters {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--card-border-light);
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.bg-light .filter-btn {
    background-color: rgba(255, 255, 255, 0.5);
}

.filter-btn:hover, .filter-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.bg-light .filter-btn:hover, .bg-light .filter-btn.active {
    background-color: rgba(0, 0, 0, 0.1);
}

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

.card {
    background-color: var(--card-bg-dark);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    backdrop-filter: blur(var(--blur-effect));
    -webkit-backdrop-filter: blur(var(--blur-effect));
    border: 1px solid var(--card-border-dark);
    animation: scaleIn 0.5s ease-out;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease, 
                background-color 0.3s ease;
}

.bg-light .card {
    background-color: var(--card-bg-light);
    border: 1px solid var(--card-border-light);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.25);
}

.bg-dark .card:hover {
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3), 
                0 0 15px rgba(255, 255, 255, 0.1);
}

.bg-light .card:hover {
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15), 
                0 0 15px rgba(0, 0, 0, 0.08);
}

.card-avatar {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 50%;
    margin: 1.5rem auto;
    width: 150px;
    height: 150px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bg-light .card-avatar {
    border: 4px solid rgba(0, 0, 0, 0.1);
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .card-avatar {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    animation: pulseGlow 2s infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.bg-light .card:hover .card-avatar {
    border-color: rgba(0, 0, 0, 0.3);
    animation: pulseGlow 2s infinite;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.card:hover .card-avatar img {
    transform: scale(1.1) rotate(2deg);
}

.card-info {
    padding: 1.25rem;
}

.card-name {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

.card:hover .card-info h3 {
    transform: translateY(-3px);
    color: #ffffff;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.bg-light .card:hover .card-info h3 {
    color: #000000;
    text-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.card-zodiac, .card-anime, .card-food {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    margin: 0.5rem 0;
    animation-fill-mode: both;
}

.bg-light .card-zodiac, .bg-light .card-anime, .bg-light .card-food {
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-dark);
}

.card:hover .card-zodiac {
    animation: slideInRight 0.4s 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}

.card:hover .card-anime {
    animation: slideInRight 0.4s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}

.card:hover .card-food {
    animation: slideInRight 0.4s 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}

.bg-light .card:hover .card-zodiac,
.bg-light .card:hover .card-anime,
.bg-light .card:hover .card-food {
    background: rgba(0, 0, 0, 0.1);
}

.empty-value {
    opacity: 0.5;
    font-style: italic;
    background: rgba(0, 0, 0, 0.1);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
    animation: fadeIn 0.3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: var(--card-bg-dark);
    margin: 10% auto;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(var(--blur-effect));
    -webkit-backdrop-filter: blur(var(--blur-effect));
    border: 1px solid var(--card-border-dark);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.bg-light .modal-content {
    background-color: var(--card-bg-light);
    border: 1px solid var(--card-border-light);
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.75rem;
    color: var(--accent);
    font-size: 1.75rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
}

.bg-light .close-btn {
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-dark);
}

.close-btn:hover {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(255, 255, 255, 0.2);
}

.person-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.person-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 6px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.person-avatar:hover {
    transform: scale(1.05) rotate(3deg);
    border-width: 8px;
}

.bg-light .person-avatar {
    border: 6px solid rgba(0, 0, 0, 0.1);
}

.person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #e0e0e0, #ffffff);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s ease;
}

.person-info h2:hover {
    transform: translateY(-3px);
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.bg-light .person-info h2 {
    background: linear-gradient(90deg, #2d2d2d, #000000);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.bg-light .person-info h2:hover {
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.person-info p {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all var(--transition-speed);
    animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation-fill-mode: both;
}

.person-info p:nth-child(2) {
    animation-delay: 0.1s;
}

.person-info p:nth-child(3) {
    animation-delay: 0.2s;
}

.person-info p:nth-child(4) {
    animation-delay: 0.3s;
}

.person-info p:nth-child(5) {
    animation-delay: 0.4s;
}

.bg-light .person-info p {
    background: rgba(255, 255, 255, 0.4);
}

.person-info p:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.15);
}

.bg-light .person-info p:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); }
    100% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.1); }
}

@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

/* 添加浮動動畫 */
.card:nth-child(odd):hover {
    /* 移除 animation: floatAnimation 4s ease-in-out infinite; */
    transform: translateY(-10px) scale(1.02);
}

.card:nth-child(even):hover {
    /* 移除 animation: floatAnimation 5s ease-in-out infinite; */
    transform: translateY(-10px) scale(1.02);
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 平滑滾動 */
html {
    scroll-behavior: smooth;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    #searchInput {
        flex-grow: 1;
    }
    
    .person-details {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 15% auto;
        padding: 1.5rem;
    }
    
    .person-avatar {
        width: 140px;
        height: 140px;
    }
    
    .person-info h2 {
        font-size: 2rem;
    }
}

/* 毛玻璃效果下的無結果顯示 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(var(--blur-effect));
    -webkit-backdrop-filter: blur(var(--blur-effect));
    border-radius: 12px;
    border: 1px solid var(--card-border-dark);
    animation: fadeIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s ease;
}

.no-results:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.bg-light .no-results {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--card-border-light);
}


/* 星座選擇器樣式 */
.zodiac-selector {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    max-width: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.zodiac-selector.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    max-width: 200px;
    margin-left: 0.75rem;
    animation: fadeInZodiac 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 美化的自定義下拉選單 */
.zodiac-select {
    padding: 0.6rem 2.8rem 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.bg-light .zodiac-select {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.zodiac-select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.bg-light .zodiac-select:focus {
    background-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

/* 自定義下拉箭頭 */
.zodiac-select-container {
    position: relative;
}

.zodiac-icon {
    position: absolute;
    right: 15px;
    color: gold;
    font-size: 0.9rem;
    pointer-events: none;
    animation: rotateStar 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
    top: 50%;
    transform: translateY(-50%);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.6);
}

.bg-light .zodiac-icon {
    color: #ff9d00;
    text-shadow: 0 0 5px rgba(255, 157, 0, 0.6);
}

/* 下拉選項樣式 */
.zodiac-select option {
    background-color: #1a1a1a;
    color: var(--text-light);
    padding: 12px;
    font-size: 0.9rem;
}

.bg-light .zodiac-select option {
    background-color: #f0f0f0;
    color: var(--text-dark);
}

/* 脈動效果 */
.pulse {
    animation: pulseEffect 0.5s cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulseEffect {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 星座選擇器入場動畫 */
@keyframes fadeInZodiac {
    from { opacity: 0; transform: translateY(10px); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* 增強的星座圖標動畫 */
@keyframes rotateStar {
    0% { transform: translateY(-50%) rotate(0deg) scale(1); filter: brightness(1); }
    25% { transform: translateY(-50%) rotate(90deg) scale(1.2); filter: brightness(1.3); }
    50% { transform: translateY(-50%) rotate(180deg) scale(1); filter: brightness(1); }
    75% { transform: translateY(-50%) rotate(270deg) scale(1.2); filter: brightness(1.3); }
    100% { transform: translateY(-50%) rotate(360deg) scale(1); filter: brightness(1); }
}

/* 選中項效果 */
#zodiacSelect:not([value=""]) {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    background-color: rgba(30, 30, 30, 0.85);
    border-color: gold;
}

.bg-light #zodiacSelect:not([value=""]) {
    box-shadow: 0 0 15px rgba(255, 157, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.85);
    border-color: #ff9d00;
}

#zodiacSelect:not([value=""]) + .zodiac-icon {
    color: gold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: starGlow 2s infinite alternate;
}

.bg-light #zodiacSelect:not([value=""]) + .zodiac-icon {
    color: #ff9d00;
    text-shadow: 0 0 10px rgba(255, 157, 0, 0.8);
}

@keyframes starGlow {
    0% { opacity: 0.8; transform: translateY(-50%) scale(1) rotate(0deg); }
    100% { opacity: 1; transform: translateY(-50%) scale(1.3) rotate(45deg); }
}

/* 打開下拉菜單時的樣式 */
.zodiac-select:focus + .zodiac-icon {
    transform: translateY(-50%) rotate(180deg);
    transition: all 0.3s ease;
}

/* 當星座過濾器激活時添加這個樣式 */
.filter-btn[data-filter="zodiac"].active + .zodiac-selector,
.filter-btn[data-filter="zodiac"].active ~ .zodiac-selector {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    max-width: 200px;
}

/* 創建霓虹光暈效果 */
#zodiacSelect:not([value=""]) {
    position: relative;
}

#zodiacSelect:not([value=""]):before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, gold, transparent, gold, transparent);
    background-size: 400% 400%;
    z-index: -1;
    border-radius: 14px;
    animation: glowingBorder 3s ease infinite;
    opacity: 0.7;
}

@keyframes glowingBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 隱藏滾動條 */
::-webkit-scrollbar {
    display: none;
}

/* 月份選擇器樣式 - 類似星座選擇器 */
.month-selector {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    max-width: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.month-selector.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    max-width: 200px;
    margin-left: 0.75rem;
    animation: fadeInZodiac 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.month-select {
    padding: 0.6rem 2.8rem 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.bg-light .month-select {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.month-select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.bg-light .month-select:focus {
    background-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.month-select-container {
    position: relative;
}

.month-icon {
    position: absolute;
    right: 15px;
    color: #ff9f43;
    font-size: 0.9rem;
    pointer-events: none;
    animation: rotateCalendar 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
    top: 50%;
    transform: translateY(-50%);
    text-shadow: 0 0 5px rgba(255, 159, 67, 0.6);
}

.bg-light .month-icon {
    color: #ff9f43;
    text-shadow: 0 0 5px rgba(255, 159, 67, 0.6);
}

@keyframes rotateCalendar {
    0% { transform: translateY(-50%) scale(1); filter: brightness(1); }
    50% { transform: translateY(-50%) scale(1.2); filter: brightness(1.3); }
    100% { transform: translateY(-50%) scale(1); filter: brightness(1); }
}

/* 選擇月份時的樣式 */
#monthSelect:not([value=""]) {
    box-shadow: 0 0 15px rgba(255, 159, 67, 0.3);
    background-color: rgba(30, 30, 30, 0.85);
    border-color: #ff9f43;
}

.bg-light #monthSelect:not([value=""]) {
    box-shadow: 0 0 15px rgba(255, 159, 67, 0.2);
    background-color: rgba(255, 255, 255, 0.85);
    border-color: #ff9f43;
}

/* 當月份過濾器激活時的樣式 */
.filter-btn[data-filter="month"].active + .month-selector,
.filter-btn[data-filter="month"].active ~ .month-selector {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    max-width: 200px;
}

/* 生日提示器樣式 */
.birthday-alert {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff7675, #d63031);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: top 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-width: 90%;
    width: auto;
    font-weight: 500;
    font-size: 1.1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.birthday-alert.active {
    top: 20px;
    animation: bounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.birthday-alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.birthday-icon {
    font-size: 1.5rem;
    animation: spin 3s linear infinite;
    color: #ffeaa7;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

#birthdayMessage {
    flex-grow: 1;
    text-align: center;
}

.close-birthday-alert {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    padding: 0;
    margin-left: auto;
}

.close-birthday-alert:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

@keyframes bounce {
    0% { top: -100px; }
    50% { top: 30px; }
    70% { top: 15px; }
    100% { top: 20px; }
}

/* 生日卡片特殊樣式 */
.birthday-today {
    position: relative;
    overflow: hidden;
    border: 2px solid #ff9f43 !important;
    box-shadow: 0 10px 30px rgba(255, 159, 67, 0.3) !important;
    animation: birthdayPulse 2s infinite alternate !important;
}

.birthday-today:before {
    content: "🎂 今天生日";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff9f43;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transform: rotate(5deg);
}

@keyframes birthdayPulse {
    0% { box-shadow: 0 10px 30px rgba(255, 159, 67, 0.3); }
    100% { box-shadow: 0 15px 40px rgba(255, 159, 67, 0.6); }
}

/* 生日彈出視窗樣式 */
.birthday-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease;
    overflow: auto;
}

.birthday-modal-content {
    position: relative;
    background: linear-gradient(135deg, #ff7675, #d63031);
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 700px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 118, 117, 0.4);
    overflow: hidden;
    animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.birthday-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.birthday-modal-header h2 {
    font-size: 2rem;
    margin: 0;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.close-birthday-modal {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    padding: 0;
}

.close-birthday-modal:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1) rotate(90deg);
}

.birthday-modal-body {
    padding: 2rem;
    text-align: center;
}

.birthday-animation {
    position: relative;
    height: 120px;
    margin-bottom: 2rem;
}

.birthday-cake-icon {
    font-size: 5rem;
    color: #ffeaa7;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    animation: cakeFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes cakeFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ffeaa7;
    animation: confettiFall 4s linear infinite;
}

@keyframes confettiFall {
    0% { transform: translateY(-50px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(150px) rotate(360deg); opacity: 0; }
}

#birthdayModalMessage {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease;
}

.birthday-people-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.birthday-person-card {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    width: 180px;
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease;
}

.birthday-person-card:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.birthday-person-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.birthday-person-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.birthday-person-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

@keyframes fadeInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 添加一個按鈕樣式，用於重新查看生日人員 */
.show-birthdays-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff7675, #d63031);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 0.5rem;
    z-index: 900;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.show-birthdays-btn.active {
    display: flex;
}

.show-birthdays-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.show-birthdays-btn i {
    font-size: 1.25rem;
}

/* 篩選結果計數器樣式 */
.filter-results {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(var(--blur-effect));
    -webkit-backdrop-filter: blur(var(--blur-effect));
    border-radius: 12px;
    border: 1px solid var(--card-border-dark);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-results.active {
    opacity: 1;
    transform: translateY(0);
}

.bg-light .filter-results {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--card-border-light);
}

#resultCount {
    font-size: 1rem;
    font-weight: 500;
}

.filter-results .count-highlight {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 4px;
    color: #74b9ff;
}

.bg-light .filter-results .count-highlight {
    color: #0984e3;
}

.filter-results .filter-icon {
    font-size: 1.1rem;
    margin-right: 5px;
    opacity: 0.8;
}