/**
 * 倒数日项目样式文件
 * 采用苹果风格的简洁设计
 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, 
        #3b82f6 0%, 
        #6366f1 20%, 
        #8b5cf6 40%, 
        #06b6d4 60%, 
        #0891b2 80%, 
        #3b82f6 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    position: relative;
}

/* 登录页面样式 */
body:not(.main-page) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

/* 主页面样式 - 支持滚动 */
body.main-page {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    min-height: 100vh;
    /* 移动端滚动优化 */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* 主页面容器确保内容可以滚动 */
body.main-page .main-container {
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* 动态渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 添加流动的背景装饰 */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 浮动光点装饰 */
body::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(147, 197, 253, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(196, 181, 253, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(125, 211, 252, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(167, 139, 250, 0.2) 0%, transparent 50%);
    background-size: 400% 400%;
    animation: floatParticles 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatParticles {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 0% 100%, 100% 0%;
    }
    25% {
        background-position: 25% 25%, 75% 75%, 60% 40%, 20% 80%, 80% 20%;
    }
    50% {
        background-position: 50% 50%, 50% 50%, 70% 30%, 40% 60%, 60% 40%;
    }
    75% {
        background-position: 75% 75%, 25% 25%, 40% 60%, 80% 20%, 20% 80%;
    }
}

/* 独立浮动光点 */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(147, 197, 253, 0.35) 30%,
        rgba(139, 92, 246, 0.3) 60%,
        rgba(59, 130, 246, 0.2) 80%,
        transparent 100%);
    filter: blur(1.5px);
    animation: float 15s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(147, 197, 253, 0.3);
}

.particle-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.particle-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 20s;
}

.particle-3 {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
    animation-duration: 16s;
}

.particle-4 {
    width: 90px;
    height: 90px;
    top: 30%;
    left: 70%;
    animation-delay: 1s;
    animation-duration: 22s;
}

.particle-5 {
    width: 70px;
    height: 70px;
    top: 50%;
    left: 10%;
    animation-delay: 3s;
    animation-duration: 19s;
}

.particle-6 {
    width: 110px;
    height: 110px;
    top: 5%;
    left: 60%;
    animation-delay: 5s;
    animation-duration: 17s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(30px, -50px) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-20px, -80px) scale(0.9);
        opacity: 0.7;
    }
    75% {
        transform: translate(50px, -30px) scale(1.05);
        opacity: 0.75;
    }
}

/* 登录容器 */
.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 10;
}

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

/* Logo 区域 */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    color: #ffffff;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
}

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

.logo-section h1 {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* 表单样式 */
.login-form {
    margin-top: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 50px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

/* 输入框容器（用户名和密码） */
.input-wrapper,
.password-input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 50px;
}

/* 密码输入框需要为两个按钮留出空间 */
.password-input-wrapper input {
    padding-right: 90px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: #ffffff;
}

/* 密码框的清除按钮位置（在显示/隐藏按钮左侧） */
.password-input-wrapper .clear-input {
    right: 44px;
}

.eye-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* 清除按钮样式 */
.clear-input {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
}

.clear-input:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.clear-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.2) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

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

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

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 错误消息 */
.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 59, 48, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    animation: shake 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* 表单选项（保持登录和忘记密码） */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
    border-radius: 4px;
}

.forgot-password {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.forgot-password:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

/* 测试账号提示 */
.test-accounts {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.test-accounts p {
    margin-bottom: 4px;
}

.test-accounts strong {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* 主页面样式 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* 滚动淡入动画 */
    opacity: 0;
    transform: translateY(-20px);
    animation: headerFadeIn 0.6s ease-out forwards;
}

@keyframes headerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header .username {
    font-size: 16px;
    color: #1d1d1f;
    font-weight: 500;
}

.btn-admin {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-admin:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-admin svg {
    width: 18px;
    height: 18px;
}

.btn-logout {
    padding: 10px 20px;
    background: #ff3b30;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #ff2d20;
    transform: translateY(-1px);
}

/* 倒数日列表 */
.countdown-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.countdown-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    /* 滚动淡入动画初始状态 */
    opacity: 0;
    transform: translateY(30px);
}

/* 滚动时显示的动画类 */
.countdown-card.scroll-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.countdown-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.countdown-card .card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.countdown-card .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.countdown-card .title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.countdown-card .target-date {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 16px;
}

.countdown-card .days-left {
    font-size: 36px;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 8px;
}

/* 不同状态的卡片样式 */
.countdown-card.urgent .days-left {
    color: #ff3b30;
}

.countdown-card.soon .days-left {
    color: #ff9500;
}

.countdown-card.past .days-left {
    color: #86868b;
}

.countdown-card.urgent {
    border-left: 4px solid #ff3b30;
}

.countdown-card.soon {
    border-left: 4px solid #ff9500;
}

.countdown-card.past {
    border-left: 4px solid #86868b;
    opacity: 0.8;
}

.countdown-card .days-label {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 12px;
}

.countdown-card .description {
    font-size: 14px;
    color: #515154;
    line-height: 1.5;
    padding-top: 12px;
    border-top: 1px solid #f5f5f7;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* 滚动淡入动画 */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease-out forwards;
}

.empty-state svg {
    width: 120px;
    height: 120px;
    color: #d2d2d7;
    margin-bottom: 24px;
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 16px;
    color: #86868b;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-box {
        padding: 32px 24px;
    }

    .countdown-list {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    /* 移动端滚动优化 */
    body.main-page {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
    
    .main-container {
        padding: 20px 15px;
    }
    
    .header {
        padding: 20px;
        margin-bottom: 24px;
    }
    
    .countdown-card {
        padding: 20px;
    }
}

/* ==================== 管理页面样式 ==================== */

/* 返回按钮 */
.btn-back {
    padding: 10px 20px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-back:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.btn-back svg {
    width: 18px;
    height: 18px;
}

/* 管理页面列表 */
.admin-countdown-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.admin-countdown-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.admin-countdown-card.scroll-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.admin-countdown-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.admin-countdown-card .card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-countdown-card .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.admin-countdown-card .title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
    word-break: break-word;
}

.admin-countdown-card .target-date {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 16px;
}

.admin-countdown-card .description {
    font-size: 14px;
    color: #515154;
    line-height: 1.5;
    margin-bottom: 20px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f7;
    word-break: break-word;
}

.admin-countdown-card .card-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-edit, .btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-edit {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-delete {
    background: #ff3b30;
    color: #ffffff;
}

.btn-delete:hover {
    background: #ff2d20;
    transform: translateY(-1px);
}

.btn-edit svg, .btn-delete svg {
    width: 16px;
    height: 16px;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #f5f5f7;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #86868b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #1d1d1f;
    transform: rotate(90deg);
}

.modal-form {
    padding: 32px;
}

.modal-form .form-group {
    margin-bottom: 24px;
}

.modal-form .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.modal-form .form-group input,
.modal-form .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    background: #ffffff;
    color: #1d1d1f;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.modal-form .form-group input:focus,
.modal-form .form-group textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-form .form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f5f5f7;
}

.btn-cancel, .btn-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: #f5f5f7;
    color: #1d1d1f;
}

.btn-cancel:hover {
    background: #e5e5e7;
}

.btn-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 响应式设计 - 管理页面 */
@media (max-width: 768px) {
    .admin-countdown-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header, .modal-form {
        padding: 20px;
    }
    
    .admin-countdown-card .card-actions {
        flex-direction: column;
    }
    
    .btn-edit, .btn-delete {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== 图标选择器样式 ==================== */

.icon-selector {
    margin-top: 12px;
}

.icon-preview {
    width: 80px;
    height: 80px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #f9fafb;
    overflow: hidden;
    transition: all 0.2s ease;
}

.icon-preview:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.icon-preview img,
.icon-preview svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.icon-placeholder {
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
    padding: 8px;
}

.icon-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.icon-option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.icon-option-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.icon-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: #f9fafb;
    border-radius: 8px;
}

.icon-item {
    width: 50px;
    height: 50px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    padding: 8px;
}

.icon-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.05);
}

.icon-item.active {
    border-color: #3b82f6;
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.icon-item svg {
    width: 100%;
    height: 100%;
    stroke: #4b5563;
}

.icon-item.active svg {
    stroke: #3b82f6;
}

.icon-upload {
    display: flex;
    gap: 8px;
}

.btn-upload {
    padding: 10px 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-upload:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.btn-upload svg {
    width: 16px;
    height: 16px;
}

/* 响应式 - 图标选择器 */
@media (max-width: 768px) {
    .icon-list {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        max-height: 150px;
    }
    
    .icon-item {
        width: 45px;
        height: 45px;
    }
}

