/* ===== 基础样式重置 ===== */
* {
    box-sizing: border-box;
}

/* ===== 响应式容器 ===== */
.responsive-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .responsive-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .responsive-container {
        padding: 0 2rem;
    }
}

/* ===== 日历样式 ===== */
.calendar-day {
    aspect-ratio: 1;
    min-height: 50px; /* 从75px减小到50px，使在小屏幕上更合适 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(229, 231, 235, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.calendar-day:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.15), 0 8px 12px -6px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
    z-index: 10;
}

.calendar-day.today {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #6366f1;
    box-shadow: 0 6px 16px -4px rgba(99, 102, 241, 0.35), 0 4px 8px -2px rgba(99, 102, 241, 0.2);
    transform: scale(1.03);
}

@media (max-width: 640px) {
    .calendar-day {
        min-height: 60px;
        font-size: 0.875rem;
        border-radius: 12px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 50px;
        font-size: 0.75rem;
        border-radius: 10px;
        padding: 4px;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    /* 月份导航按钮 */
    .month-nav-btn {
        padding: 0.75rem;
        margin: 0 0.25rem;
    }
    
    .month-nav-btn i {
        font-size: 1rem;
    }
    
    /* 月份标题 */
    #currentMonthDisplay {
        font-size: 1.25rem;
    }
    
    /* 生日指示点 */
    .birthday-dot {
        width: 10px;
        height: 10px;
    }
    
    /* 公历日期 */
    .solar-date {
        font-size: 1rem;
    }
    
    /* 农历日期 */
    .lunar-date {
        font-size: 0.6rem;
    }
    
    /* 生日姓名 */
    .birthday-name {
        font-size: 0.7rem;
        max-width: 90%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 倒计时天数 */
    .days-remaining {
        font-size: 0.6rem;
    }
    
    /* 优化日历网格间距 */
    .calendar-grid {
        gap: 0.5rem;
    }
    
    /* 优化日历单元格内边距 */
    .calendar-day {
        padding: 6px;
    }
}

/* 超小屏幕优化 (320px及以下) */
@media (max-width: 320px) {
    /* 月份导航按钮 */
    .month-nav-btn {
        padding: 0.5rem;
        margin: 0 0.125rem;
    }
    
    .month-nav-btn i {
        font-size: 0.875rem;
    }
    
    /* 月份标题 */
    #currentMonthDisplay {
        font-size: 1rem;
    }
    
    /* 生日指示点 */
    .birthday-dot {
        width: 8px;
        height: 8px;
    }
    
    /* 公历日期 */
    .solar-date {
        font-size: 0.875rem;
    }
    
    /* 农历日期 */
    .lunar-date {
        font-size: 0.5rem;
    }
    
    /* 生日姓名 */
    .birthday-name {
        font-size: 0.6rem;
        max-width: 85%;
    }
    
    /* 倒计时天数 */
    .days-remaining {
        font-size: 0.5rem;
    }
    
    /* 日历单元格 */
    .calendar-day {
        min-height: 45px;
        font-size: 0.625rem;
        border-radius: 8px;
        padding: 3px;
    }
    
    /* 进一步优化超小屏幕上的表单元素 */
    .form-input {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .form-label {
        font-size: 0.625rem;
        margin-bottom: 0.125rem;
    }
    
    .form-radio {
        width: 0.875rem;
        height: 0.875rem;
    }
    
    /* 超小屏幕上的按钮优化 */
    .btn-primary,
    .btn-secondary {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        border-radius: 0.5rem;
    }
    
    .toggle-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
        border-radius: 0.5rem;
    }
    
    /* 超小屏幕上的月份导航按钮 */
    .month-nav-btn {
        padding: 0.375rem;
        margin: 0 0.1rem;
    }
    
    .month-nav-btn i {
        font-size: 0.75rem;
    }
    
    /* 超小屏幕上的模态框优化 */
    .modal-content {
        margin: 0.125rem;
        border-radius: 0.5rem;
    }
}

/* 生日指示点样式 */
.birthday-dot {
    width: 10px; /* 从12px减小到10px */
    height: 10px; /* 从12px减小到10px */
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
    cursor: pointer;
}

@media (max-width: 480px) {
    .birthday-dot {
        width: 8px; /* 在小屏幕上进一步减小到8px */
        height: 8px; /* 在小屏幕上进一步减小到8px */
    }
}

.birthday-dot:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.birthday-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

/* 公历生日指示点 */
.birthday-dot.bg-pink-500 {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

/* 农历生日指示点 */
.birthday-dot.bg-green-500 {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* 已过生日指示点 */
.birthday-dot.bg-blue-400 {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.birthday-dot.bg-green-400 {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

@media (max-width: 640px) {
    .birthday-dot {
        width: 8px;
        height: 8px;
    }
    
    /* ===== 星期标题样式 ===== */
    .calendar-grid > div:nth-child(1),
    .calendar-grid > div:nth-child(7) {
        color: #ef4444;
        font-weight: 600;
    }
    
    .calendar-grid > div:nth-child(2),
    .calendar-grid > div:nth-child(3),
    .calendar-grid > div:nth-child(4),
    .calendar-grid > div:nth-child(5),
    .calendar-grid > div:nth-child(6) {
        color: #374151;
        font-weight: 600;
    }
}

/* ===== 双历日期容器 ===== */
.dual-calendar-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
}

.solar-date {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1f2937;
}

.lunar-date {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 500;
    line-height: 1;
}

@media (max-width: 640px) {
    .solar-date {
        font-size: 1.1rem;
    }

    .lunar-date {
        font-size: 0.65rem;
    }
}

/* ===== 卡片样式 ===== */
.countdown-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(10px);
}

.countdown-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

@media (max-width: 640px) {
    .countdown-card {
        border-radius: 0.75rem;
    }

    .countdown-card:hover {
        transform: translateY(-2px);
    }
}

/* ===== 表单动画 ===== */
.birthday-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.birthday-form.active {
    max-height: 1200px; /* 增加最大高度以适应所有内容 */
    opacity: 1;
}

@media (max-width: 640px) {
    .birthday-form.active {
        max-height: 1500px; /* 为小屏幕设备进一步增加最大高度 */
    }
    
    /* 进一步优化小屏幕上的表单内边距 */
    .birthday-form {
        padding: 1rem;
    }
}

/* ===== 消息动画 ===== */
.flash-message {
    animation: slideInFadeOut 6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    border-radius: 0.75rem;
    border-left: 4px solid currentColor;
}

@keyframes slideInFadeOut {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ===== 双历日期容器 ===== */
.dual-calendar-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.solar-date {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.lunar-date {
    font-size: 0.7rem;
    color: #6B7280;
    font-weight: 400;
    line-height: 1;
}

@media (max-width: 640px) {
    .solar-date {
        font-size: 1rem;
    }

    .lunar-date {
        font-size: 0.625rem;
    }
}

/* ===== 倒计时数字样式 ===== */
.countdown-number {
    font-size: 2.5rem; /* 从3rem减小到2.5rem */
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 0.5rem 0;
    background: linear-gradient(135deg, currentColor 0%, currentColor 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

@media (max-width: 480px) {
    .countdown-number {
        font-size: 1.5rem; /* 在超小屏幕上进一步减小到1.5rem */
    }
}

.countdown-number::before {
    content: "";
    position: absolute;
    height: 6px;
    width: 100%;
    border-radius: 3px;
    background: linear-gradient(135deg, currentColor 0%, currentColor 100%);
    bottom: 0;
    left: 0;
    opacity: 0.2;
}

.countdown-number.gray {
    color: #9CA3AF;
}

@media (max-width: 640px) {
    .countdown-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .countdown-number {
        font-size: 2rem;
    }
}

/* ===== 按钮样式 ===== */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px -3px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5b5bd6 0%, #7c3aed 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px -3px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px -3px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px -3px rgba(16, 185, 129, 0.3);
}

.toggle-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4f46e5;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.toggle-button:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(79, 70, 229, 0.2);
}

.toggle-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px -2px rgba(79, 70, 229, 0.2);
}

@media (max-width: 640px) {
    .toggle-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ===== 月份导航按钮 ===== */
.month-nav-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.month-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.3);
}

.month-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px -4px rgba(99, 102, 241, 0.2);
}

/* ===== 点击波纹效果 ===== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ===== 模态框样式 ===== */
.modal-overlay {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
    /* 改善移动端滚动 */
    -webkit-overflow-scrolling: touch;
    /* 确保内容不会被遮挡 */
    position: relative;
}

.modal-content.show {
    transform: scale(1);
}

@media (max-width: 640px) {
    .modal-content {
        border-radius: 1rem;
        margin: 0.5rem;
        max-height: 85vh;
        /* 移动端更好的滚动体验 */
        overflow-y: scroll;
        /* 防止内容溢出 */
        word-wrap: break-word;
    }
}

/* 确保模态框内容区域有足够的内边距 */
.modal-content > div {
    padding-bottom: 1rem;
}

/* 移动端模态框优化 */
@media (max-width: 480px) {
    .modal-content {
        margin: 0.25rem;
        max-height: 85vh; /* 从90vh减小到85vh */
        border-radius: 0.75rem;
    }
}

/* 强制滚动样式 */
.modal-scrollable {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: 90vh !important;
}

@media (max-width: 768px) {
    .modal-scrollable {
        max-height: 85vh !important;
    }
}

/* 确保模态框内容不会被截断 */
.modal-content * {
    max-width: 100%;
    word-wrap: break-word;
}

/* 模态框内的表单元素优化 */
.modal-content input,
.modal-content select,
.modal-content textarea {
    max-width: 100%;
    box-sizing: border-box;
}

/* 模态框内的按钮组优化 */
.modal-content .grid {
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .modal-content .grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 特性项目样式 ===== */
.feature-item {
    border-left: 3px solid #e5e7eb;
    padding-left: 1rem;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 0 0.5rem 0.5rem 0;
}

.feature-item.active {
    border-color: #6366F1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
}

.feature-item.important {
    border-color: #F59E0B;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.feature-item.active .feature-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.feature-item.important .feature-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

/* ===== 倒计时圆圈样式 ===== */
.countdown-circle {
    position: relative;
    width: 150px; /* 从180px减小到150px */
    height: 150px; /* 从180px减小到150px */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .countdown-circle {
        width: 120px; /* 在超小屏幕上进一步减小到120px */
        height: 120px; /* 在超小屏幕上进一步减小到120px */
    }
}

.countdown-circle::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(244, 114, 182, 0.1) 100%);
    z-index: 0;
    animation: pulse 3s infinite ease-in-out;
}

.countdown-circle.urgent::before {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    animation: urgentPulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

@keyframes urgentPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.8;
    }
}

@media (max-width: 640px) {
    .countdown-circle {
        width: 150px;
        height: 150px;
    }
}

/* ===== 生日卡片样式 ===== */
.birthday-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(229, 231, 235, 0.6);
}

.birthday-card::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    top: -150px;
    right: -100px;
    z-index: 0;
    transition: all 0.3s ease;
}

.birthday-card::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0) 70%);
    border-radius: 50%;
    bottom: -100px;
    left: -50px;
    z-index: 0;
    transition: all 0.3s ease;
}

.birthday-card:hover::before {
    transform: scale(1.1);
    opacity: 0.8;
}

.birthday-card:hover::after {
    transform: scale(1.1);
    opacity: 0.8;
}

@media (max-width: 640px) {
    .birthday-card {
        border-radius: 1rem;
    }

    .birthday-card::before {
        width: 200px;
        height: 200px;
        top: -100px;
        right: -50px;
    }

    .birthday-card::after {
        width: 150px;
        height: 150px;
        bottom: -75px;
        left: -25px;
    }
}

/* ===== 网格布局优化 ===== */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr 2fr;
        gap: 2.5rem;
    }
}

@media (min-width: 1280px) {
    .main-grid {
        gap: 3rem;
    }
}

/* ===== 日历网格优化 ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .calendar-grid {
        gap: 0.5rem;
    }
}

/* ===== 表单样式优化 ===== */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-radio {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.form-radio:checked {
    border-color: #6366f1;
    background-color: #6366f1;
}

@media (max-width: 640px) {
    .form-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
}

/* ===== 加载动画 ===== */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== 状态指示器 ===== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-indicator.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-indicator.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.status-indicator.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* ===== 工具提示样式 ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== 视图切换按钮样式 ===== */
.view-toggle-btn {
    background: transparent;
    color: #6b7280;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
}

.view-toggle-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.3);
}

.view-toggle-btn:hover:not(.active) {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

@media (max-width: 640px) {
    .view-toggle-btn {
        min-width: 50px;
        padding: 0.5rem 0.75rem;
    }
}

/* ===== 搜索框样式 ===== */
#searchInput {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#searchInput:focus {
    background: white;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

#searchInput::placeholder {
    color: #9ca3af;
    font-style: italic;
}

@media (max-width: 640px) {
    #searchInput {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* ===== 表格样式优化 ===== */
.table-container {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(229, 231, 235, 0.6);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    font-weight: 600;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

table th:first-child {
    border-top-left-radius: 1rem;
}

table th:last-child {
    border-top-right-radius: 1rem;
}

table td {
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* 移动端表格优化 */
@media (max-width: 768px) {
    .table-container {
        border-radius: 0.75rem;
        margin: 0 -0.5rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }

    table th {
        font-size: 0.75rem;
    }

    table td {
        font-size: 0.875rem;
    }

    /* 移动端表格滚动提示 */
    .table-scroll::after {
        content: "← 左右滑动查看更多 →";
        position: absolute;
        bottom: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        color: #9ca3af;
        background: rgba(255, 255, 255, 0.9);
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        pointer-events: none;
        opacity: 0.7;
    }

    .table-scroll {
        position: relative;
        padding-bottom: 2rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    table th,
    table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }

    table th {
        font-size: 0.625rem;
    }

    /* 移动端紧凑模式 */
    .table-scroll table {
        min-width: 600px;
    }

    /* 优化移动端按钮 */
    table .touch-target {
        min-width: 36px;
        min-height: 36px;
        padding: 0.25rem;
    }
}

/* ===== 触摸目标优化 ===== */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .touch-target {
        min-height: 48px;
        min-width: 48px;
    }
}

/* ===== 搜索结果高亮 ===== */
.search-highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* ===== 渐变文字样式 ===== */
.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ===== 品牌标识样式 ===== */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.brand-logo-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 1rem;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

@media (max-width: 640px) {
    .brand-logo-icon {
        padding: 0.6rem;
    }
}
/* ===== 动画优化 ===== */
.birthday-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.birthday-item.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

/* ===== 响应式表格滚动 ===== */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll::-webkit-scrollbar {
    height: 6px;
}

.table-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 3px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* 表单元素在小屏幕上的优化 */
@media (max-width: 480px) {
    .form-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .form-radio {
        width: 1rem;
        height: 1rem;
    }
    
    /* 登录表单优化 */
    .login-form-input {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* 编辑表单优化 */
    #birthdayForm .mb-4 {
        margin-bottom: 1rem;
    }
    
    /* 模态框内的表单元素 */
    .modal-content .form-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .modal-content .form-label {
        font-size: 0.75rem;
    }
}

/* 触摸目标在超小屏幕上的优化 */
@media (max-width: 320px) {
    .touch-target {
        min-height: 40px;
        min-width: 40px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .toggle-button {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    /* 月份导航按钮 */
    .month-nav-btn {
        padding: 0.5rem;
    }
    
    /* 触摸目标在更小屏幕上的优化 */
    .touch-target {
        min-height: 36px;
        min-width: 36px;
    }
    
    /* 更小屏幕上的按钮优化 */
    .btn-primary,
    .btn-secondary {
        padding: 0.375rem 0.5rem;
        font-size: 0.625rem;
    }
    
    /* 更小屏幕上的表单元素优化 */
    .form-input {
        padding: 0.375rem 0.5rem;
        font-size: 0.625rem;
    }
    
    .form-label {
        font-size: 0.5rem;
    }
    
    .form-radio {
        width: 0.75rem;
        height: 0.75rem;
    }
}

/* ===== 全局水印样式 ===== */
.watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
    opacity: 0.05;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><text x="50%" y="50%" font-family="Arial, sans-serif" font-size="20" fill="%23000000" text-anchor="middle" dominant-baseline="middle" transform="rotate(-45 100 100)">龙川县田家炳中学-黄金轩</text></svg>');
    background-repeat: repeat;
    background-size: 200px 200px;
    user-select: none;
}

/* 深色模式水印适配 */
@media (prefers-color-scheme: dark) {
    .watermark {
        opacity: 0.08;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><text x="50%" y="50%" font-family="Arial, sans-serif" font-size="20" fill="%23ffffff" text-anchor="middle" dominant-baseline="middle" transform="rotate(-45 100 100)">龙川县田家炳中学-黄金轩</text></svg>');
    }
}

/* 移动端水印优化 */
@media (max-width: 768px) {
    .watermark {
        background-size: 150px 150px;
        opacity: 0.03;
    }
}

/* 打印时隐藏水印 */
@media print {
    .watermark {
        display: none;
    }
}
