/* =============================================
   mudana-moji-cut.css - サニタイズツール用
   20260707版対応・実用重視
============================================= */

:root {
    --bg: #f4f7f9;
    --text: #333;
    --accent: #0066ff;
    --border: #cfd8dc;
    --light-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1e2529;
        --text: #e0e0e0;
        --accent: #4d9fff;
        --border: #455a64;
        --light-bg: #263238;
    }
}

/* ===== 基本レイアウト ===== */
body {
    font-family: system-ui, -apple-system, "Segoe UI", "Meiryo", sans-serif;
    margin: 20px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.85rem;
}

p {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* ===== チェックボックスエリア ===== */
.checkbox-group {
    text-align: center;
    margin: 15px 0;
    font-size: 1rem;
}

.checkbox-group label {
    cursor: pointer;
    user-select: none;
}

/* ===== ボタン ===== */
.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

button {
    padding: 11px 22px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary   { background: var(--accent); color: #fff; }
.btn-secondary { background: #546e7a; color: #fff; }
.btn-clear     { background: #e53935; color: #fff; }

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:hover   { background: #0052cc; }
.btn-secondary:hover { background: #455a64; }
.btn-clear:hover     { background: #c62828; }

/* 履歴ボタン */
.btn-history {
    background: var(--light-bg);
    border: 1px solid #ccc;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: #555;
    border-radius: 5px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
    cursor: pointer;
}

.btn-history:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #2196f3;
}

/* ===== 入出力エリア ===== */
.io-container {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.io-container > div {
    flex: 1;
    min-width: 280px;
}

.io-container strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.05rem;
    color: var(--text);
}

textarea {
    width: 100%;
    height: 360px;           /* 少し高めに調整 */
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14.5px;
    line-height: 1.5;
    background: var(--light-bg);
    color: var(--text);
    resize: vertical;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

textarea#output {
    cursor: default;
    border-color: #90caf9;
    background: #f8fbff;
}

@media (prefers-color-scheme: dark) {
    textarea#output {
        background: #263238;
    }
}

/* ===== 文字数表示 ===== */
#inputCount, #outputCount {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== トースト通知 ===== */
#copyToast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 10000;
    pointer-events: none;
}

#copyToast.show {
    opacity: 1;
    visibility: visible;
    bottom: 35px;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .io-container {
        flex-direction: column;
    }
    
    textarea {
        height: 280px;
    }
    
    .controls {
        gap: 10px;
    }
    
    button {
        padding: 10px 18px;
        font-size: 0.98rem;
    }
}