/* css/style.css */

/* === 1. ベース設定 (共通) === */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === 2. レイアウト (共通) === */
main {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* 記事コンテンツ用（SEO対策用テキストなど） */
.content-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.content-section h2 {
    font-size: 1.4rem;
    margin-top: 0;
}

.content-section h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

h2 {
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    font-size: 1.3rem;
}

p {
    margin-bottom: 1rem;
    color: #555;
}

/* === 3. ヘッダー＆ナビゲーション (全デバイス共通ハンバーガー) === */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

/* デスクトップ用メニューは廃止するため削除または非表示 */
.desktop-nav {
    display: none !important; 
}

/* ハンバーガーボタン (常に表示) */
.hamburger {
    display: block; /* 常に表示 */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #2c3e50;
}

/* モバイルメニュー (全デバイスで使用) */
.mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    transform: translateY(-150%);
    transition: transform 0.3s ease-out;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f1f5f9;
    font-weight: bold;
}

@media (min-width: 768px) {
    .desktop-nav { display: block; }
}

/* === 4. フッター (共通) === */
footer {
    background: white;
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

footer a {
    text-decoration: none;
    color: #94a3b8;
    margin: 0 10px;
}

/* === 5. コンポーネント (ボタンなど) === */
.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
    text-align: center;
}

.btn:hover {
    background-color: #2980b9;
}

/* === 6. ツール固有: 文字数カウンター === */
.input-wrapper { position: relative; width: 100%; margin-bottom: 1rem; }
.input-wrapper textarea {
    width: 100%;
    height: 300px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}
.input-wrapper textarea:focus { outline: none; border-color: #3498db; }

.toolbar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 5px; }
.tool-btn { background: none; border: none; color: #64748b; cursor: pointer; font-size: 0.9rem; padding: 5px 10px; border-radius: 4px; transition: 0.2s; }
.tool-btn:hover { background-color: #e2e8f0; color: #2c3e50; }
.tool-btn.danger:hover { background-color: #fee2e2; color: #ef4444; }

.results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.result-item { text-align: center; padding: 10px; background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.result-number { display: block; font-size: 1.8rem; font-weight: bold; color: #3498db; margin-bottom: 5px; }
.result-label { font-size: 0.8rem; color: #64748b; font-weight: bold; }
.result-sub { font-size: 0.75rem; color: #94a3b8; margin-top: 4px; }
.status-bar { margin-top: 10px; font-size: 0.8rem; color: #27ae60; text-align: right; height: 1.2em; opacity: 0; transition: opacity 0.5s; }
.status-bar.show { opacity: 1; }

/* === 7. ツール固有: パスワード生成 === */
.tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid #e2e8f0; }
.tab-btn { flex: 1; padding: 10px; background: none; border: none; cursor: pointer; font-weight: bold; color: #94a3b8; border-bottom: 2px solid transparent; transition: 0.3s; }
.tab-btn.active { color: #3498db; border-bottom: 2px solid #3498db; }

.result-wrapper { position: relative; margin-bottom: 20px; }
.result-box { background: #e2e8f0; padding: 15px; padding-right: 50px; font-size: 1.2rem; text-align: center; border-radius: 6px; font-family: monospace; word-break: break-all; min-height: 1.5em; display: flex; align-items: center; justify-content: center; }
.copy-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: white; border: 1px solid #ccc; border-radius: 4px; padding: 5px 10px; cursor: pointer; font-size: 0.8rem; color: #555; transition: 0.2s; }
.copy-btn:hover { background: #f8fafc; color: #3498db; border-color: #3498db; }

.controls { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.control-group { display: none; flex-direction: column; gap: 12px; }
.control-group.active { display: flex; }
label { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
input[type="range"] { flex: 1; margin-left: 15px; margin-right: 10px; }
button.generate-btn { background-color: #3498db; color: white; border: none; padding: 12px; border-radius: 6px; cursor: pointer; font-size: 1rem; font-weight: bold; width: 100%; transition: background 0.2s; box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3); }
button.generate-btn:hover { background-color: #2980b9; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #333; color: white; padding: 10px 20px; border-radius: 20px; opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 100; font-size: 0.9rem; }
.toast.show { opacity: 1; }


/* === 以下をstyle.cssの末尾に追記してください (時計ページ用) === */

/* 時計デザイン */
.clock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.clock-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid #e2e8f0;
}

.clock-title {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: bold;
}

/* デジタル時計 */
.digital-clock {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    letter-spacing: 2px;
}
.digital-date {
    font-size: 1rem;
    color: #94a3b8;
    margin-top: 5px;
}

/* ネオン時計 */
.neon-clock {
    background-color: #222;
    color: #0f0;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.5rem;
    text-shadow: 0 0 10px #0f0;
    border: 2px solid #333;
}

/* アナログ時計 */
.analog-clock {
    width: 200px;
    height: 200px;
    border: 8px solid #2c3e50;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    background: white;
}
.analog-clock::after { /* 中心点 */
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}
.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background: #2c3e50;
    border-radius: 4px;
}
.hour-hand {
    width: 6px;
    height: 50px;
    margin-left: -3px;
}
.min-hand {
    width: 4px;
    height: 70px;
    margin-left: -2px;
    background: #34495e;
}
.sec-hand {
    width: 2px;
    height: 80px;
    margin-left: -1px;
    background: #e74c3c;
}
.dial-number {
    position: absolute;
    font-weight: bold;
    color: #333;
    font-size: 1.2rem;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    margin-left: -10px;
    margin-top: -10px;
}

/* === style.css 末尾のポモドーロタイマー用スタイルをこれに書き換え === */

/* ポモドーロタイマー (高機能版) */
.timer-settings {
    background-color: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: bold;
}

.setting-item select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: white;
}

.test-sound-btn {
    background: none;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.test-sound-btn:hover {
    background-color: #3498db;
    color: white;
}

/* 2カラムレイアウト */
.timer-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.timer-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.timer-card.active {
    border-color: #3498db;
    background-color: #f0f9ff;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.timer-card.break-mode.active {
    border-color: #27ae60;
    background-color: #f0fdf4;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.15);
}

.timer-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #64748b;
    margin-bottom: 10px;
}

.timer-display {
    font-size: 3.5rem;
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Courier New', Courier, monospace;
    margin: 10px 0;
    line-height: 1;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.timer-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: 0.2s;
    min-width: 80px;
}

.btn-start { background-color: #3498db; }
.btn-start:hover { background-color: #2980b9; }

.btn-stop { background-color: #95a5a6; }
.btn-stop:hover { background-color: #7f8c8d; }

.btn-reset { background-color: #bdc3c7; color: #333; }
.btn-reset:hover { background-color: #aeb6bf; }

/* 休憩用の色上書き */
.break-mode .btn-start { background-color: #27ae60; }
.break-mode .btn-start:hover { background-color: #219150; }

.content-section h3 {
    border-left: 5px solid #3498db;
    padding-left: 10px;
    margin-top: 2rem;
}

/* === style.css 末尾に追加 (全角半角変換機用) === */

.converter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.area-label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.input-area textarea {
    width: 100%;
    height: 150px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.input-area textarea:focus {
    outline: none;
    border-color: #3498db;
}

.input-area.output-area textarea {
    background-color: #f8fafc;
    color: #333;
}

.toolbar-mini {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
}

.text-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
}

.text-btn:hover { color: #3498db; }

.action-area {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.action-label {
    margin-top: 0;
    font-size: 0.9rem;
    font-weight: bold;
    color: #64748b;
    margin-bottom: 15px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.conv-btn {
    padding: 15px;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.conv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-color: #3498db;
    color: #3498db;
}

.conv-btn strong {
    font-size: 1rem;
}

.conv-btn span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.conv-btn.primary {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.conv-btn.primary span { color: #e0f2fe; }
.conv-btn.primary:hover { background-color: #2980b9; color: white; }

.copy-large-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.copy-large-btn:hover { background-color: #219150; }