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

:root {
    --ios-primary: #007AFF;
    --ios-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --ios-glass: rgba(255, 255, 255, 0.25);
    --ios-text: #ffffff;
    --ios-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--ios-bg);
    color: var(--ios-text);
    transition: background 0.5s ease;
}

/* 主题样式 */
.theme-ios {
    --theme-primary: #007AFF;
    --theme-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --theme-glass: rgba(255, 255, 255, 0.25);
    --theme-card: rgba(255, 255, 255, 0.3);
}

.theme-scifi {
    --theme-primary: #00D4FF;
    --theme-bg: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --theme-glass: rgba(0, 212, 255, 0.1);
    --theme-card: rgba(0, 212, 255, 0.15);
}

.theme-anime {
    --theme-primary: #FF6B9D;
    --theme-bg: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    --theme-glass: rgba(255, 255, 255, 0.4);
    --theme-card: rgba(255, 255, 255, 0.5);
}

.theme-dark {
    --theme-primary: #1ED760;
    --theme-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --theme-glass: rgba(30, 215, 96, 0.1);
    --theme-card: rgba(30, 215, 96, 0.15);
}

body {
    background: var(--theme-bg);
}

/* 粒子背景 */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 液态玻璃容器 */
.glass-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 头部 */
.header {
    background: var(--theme-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--ios-shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: slideDown 0.6s ease;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #34C759;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* 标签栏 */
.tab-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--theme-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--ios-shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: slideUp 0.6s ease;
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-text);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--theme-primary);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
    color: white;
}

.tab-icon {
    font-size: 24px;
}

.tab-label {
    font-size: 12px;
    font-weight: 500;
}

/* 内容区域 */
.content-wrapper {
    background: var(--theme-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--ios-shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
    min-height: 500px;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

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

/* 首页样式 */
.info-card {
    background: var(--theme-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.info-card h2 {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 600;
}

.runtime-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.time-unit {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px 30px;
    border-radius: 12px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.time-unit:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}

.time-value {
    font-size: 48px;
    font-weight: 700;
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}

.time-label {
    font-size: 14px;
    opacity: 0.8;
}

.time-separator {
    font-size: 36px;
    font-weight: 700;
    opacity: 0.5;
}

.status-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.status-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

.status-icon {
    font-size: 24px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #34C759;
    color: white;
}

/* 跳转页面 */
.page-title {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 700;
}

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

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    background: var(--theme-card);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.link-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.4);
}

.link-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.link-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.link-desc {
    font-size: 14px;
    opacity: 0.7;
}

/* 工具页面 */
.tool-card {
    background: var(--theme-card);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tool-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}

.tool-desc {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.file-input,
.url-input {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.file-input::file-selector-button,
.file-input::-webkit-file-upload-button {
    background: var(--theme-primary);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

.file-input:focus,
.url-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

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

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--theme-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.5);
}

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

.result-box {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-height: 60px;
    display: none;
}

.result-box.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 作者页面 */
.author-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    background: var(--theme-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.avatar {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.author-card h2 {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 700;
}

.contact-info p {
    font-size: 16px;
    margin-bottom: 15px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.skill-tag {
    padding: 8px 20px;
    background: var(--theme-primary);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.notice {
    margin-top: 30px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    border-left: 4px solid #FFC107;
}

.notice p {
    font-size: 14px;
    color: #FFC107;
}

/* 主题切换器 */
.theme-switcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--theme-glass);
    backdrop-filter: blur(20px);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.theme-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.theme-btn.active {
    background: var(--theme-primary);
    color: white;
    transform: scale(1.1);
}

/* 动画类 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.bounce-in {
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-up {
    animation: slideUp 0.8s ease 0.2s both;
}

.fade-in {
    animation: fadeIn 0.8s ease;
}

.scale-in {
    animation: scaleIn 0.8s ease;
}

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

/* 碰撞动画 */
.collision-bounce {
    animation: collisionBounce 0.5s ease;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .glass-container {
        padding: 10px;
    }

    .header {
        padding: 15px 20px;
    }

    .header h1 {
        font-size: 20px;
    }

    .tab-bar {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
    }

    .content-wrapper {
        padding: 20px;
    }

    .time-value {
        font-size: 36px;
    }

    .time-unit {
        padding: 15px 20px;
        min-width: 80px;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .theme-switcher {
        bottom: 20px;
        right: 20px;
    }

    .theme-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}