/* 基础样式 */
:root {
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent; /* 移除移动端触摸高亮 */
    touch-action: manipulation; /* 优化触摸操作 */
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: border-color var(--transition-speed);
}

.header-controls {
    display: flex;
    gap: 15px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity var(--transition-speed);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 15px 10px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    header {
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    footer {
        margin-top: 20px;
        font-size: 0.75rem;
    }
    
    /* 调整按钮更易于触摸 */
    .theme-toggle, .minimize-toggle {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 10px 8px;
    }
    
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .header-controls {
        gap: 10px;
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--notification-bg);
    color: var(--notification-text);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 1000;
    text-align: center;
    max-width: 90%;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 简洁模式 */
body.minimized {
    height: 100vh;
    overflow: hidden;
}

body.minimized .logo {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

body.minimized header {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: none;
}

body.minimized .settings-panel,
body.minimized footer {
    display: none;
}

body.minimized .tomato-counter {
    margin-top: 10px;
    opacity: 0.5;
}

/* 番茄计数器 */
.tomato-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.counter-label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.7;
}

.tomatoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tomato {
    width: 22px;
    height: 22px;
    fill: var(--primary-color);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

/* 隐藏滚动条但保留滚动功能 */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 添加安全区域适配（针对 iPhone X 及以上） */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .notification {
        bottom: max(20px, env(safe-area-inset-bottom));
    }
} 