/* 全局变量 */
:root {
    /* 浅色模式颜色 */
    --background-color: #f2f2f7;
    --card-background: #ffffff;
    --text-primary: #000000;
    --text-secondary: #6c6c70;
    --border-color: #e5e5ea;
    --accent-color: #007aff;
    --success-color: #34c759;
    --warning-color: #ff9500;
    --error-color: #ff3b30;
    --header-background: #f9f9f9;
    --footer-background: #f9f9f9;
}

/* 深色模式颜色 */
body.dark-mode {
    --background-color: #1c1c1e;
    --card-background: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #ebebf5;
    --border-color: #38383a;
    --accent-color: #0a84ff;
    --success-color: #30d158;
    --warning-color: #ff9f0a;
    --error-color: #ff453a;
    --header-background: #2c2c2e;
    --footer-background: #2c2c2e;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--header-background);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* 主题切换开关 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 1000;
}

.toggle-label {
    margin-left: 10px;
    color: var(--text-primary);
    font-size: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e4e4e4;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* iframe 容器样式 */
.frames-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(375px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.frame-wrapper {
    display: flex;
    flex-direction: column;
    background-color: var(--card-background);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.frame-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.frame-wrapper h2 {
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

iframe {
    width: 100%;
    height: 667px; /* iPhone 8 高度 */
    border: none;
    background-color: var(--card-background);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    background-color: var(--footer-background);
    border-radius: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .frames-container {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
    }
} 