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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.language-selector select {
    padding: 8px 15px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    border-color: #764ba2;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #444;
}

/* タスク入力セクション */
.task-section {
    grid-column: 1 / -1;
}

.task-input-group {
    display: flex;
    gap: 10px;
}

#task-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#task-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.primary-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 集中力メーター */
.focus-meter {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.meter-container {
    flex: 1;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.focus-bar {
    height: 100%;
    width: 0%;
    background: #4CAF50;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.focus-score {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    min-width: 80px;
    text-align: center;
}

.focus-indicators {
    display: flex;
    gap: 20px;
}

.indicator {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 10px;
}

.indicator-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.indicator-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #444;
}

/* タイマー表示 */
.timer-display {
    text-align: center;
    margin-bottom: 20px;
}

#timer {
    font-size: 3rem;
    font-weight: 300;
    color: #333;
    letter-spacing: 2px;
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.control-btn {
    padding: 10px 25px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 統計セクション */
.stats-section {
    grid-column: 1 / -1;
}

.stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 8px 20px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.chart-container {
    height: 250px;
    margin-bottom: 20px;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-card {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: normal;
}

.stat-card p {
    font-size: 1.4rem;
    font-weight: 600;
    color: #444;
}

/* セッション履歴 */
.history-section {
    grid-column: 1 / -1;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 15px;
    background: #f8f8f8;
    border-radius: 10px;
    margin-bottom: 10px;
}

.history-task {
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.history-details {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
}

/* フッター */
footer {
    text-align: center;
    padding: 30px;
    color: white;
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .stats-summary {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    #timer {
        font-size: 2rem;
    }
    
    .focus-score {
        font-size: 1.5rem;
    }
}

/* スクロールバーのスタイリング */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}