/* ═══════════════════════════════════════════════
   👁️ VISIBILITY FIX — 視認性大幅改善
   ═══════════════════════════════════════════════ */

/* ━━━ グローバル文字サイズ＆コントラスト改善 ━━━ */
body {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #e8e8e8 !important;
}

/* メインコンテンツ全体 */
.main-content, .content, .panel-content, .tab-content {
    color: #e0e0e0 !important;
    font-size: 15px !important;
}

/* ━━━ テキストエリア視認性 ━━━ */
textarea, input[type="text"], input[type="password"], input[type="number"] {
    color: #f0f0f0 !important;
    font-size: 15px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    padding: 12px !important;
}
textarea:focus, input:focus {
    border-color: #00ff88 !important;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.15) !important;
}
textarea::placeholder, input::placeholder {
    color: #888 !important;
}

/* ━━━ ボタン視認性強化 ━━━ */
button, .btn, [role="button"] {
    font-size: 14px !important;
    padding: 10px 18px !important;
    min-height: 40px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
}

/* メインアクションボタン */
button[class*="encrypt"], button[class*="primary"], .btn-primary {
    background: linear-gradient(135deg, #00cc66, #00ff88) !important;
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}
button[class*="decrypt"], .btn-secondary {
    background: linear-gradient(135deg, #0088ff, #00ccff) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

/* ━━━ ラベル＆ヘッダー ━━━ */
label, .label, .form-label {
    color: #ccc !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
}
h1, h2, h3, h4 {
    color: #fff !important;
    font-weight: 700 !important;
}
h1 { font-size: 28px !important; }
h2 { font-size: 22px !important; }
h3 { font-size: 18px !important; }

/* ━━━ サイドバー視認性 ━━━ */
.sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.sidebar .nav-btn, .sidebar button {
    font-size: 13px !important;
    padding: 10px 14px !important;
    color: #ccc !important;
    min-height: 36px !important;
}
.sidebar .nav-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}
.sidebar .nav-btn.active {
    color: #00ff88 !important;
    background: rgba(0, 255, 136, 0.1) !important;
    border-left: 3px solid #00ff88 !important;
}

/* サイドバー内のサブテキスト */
.sa-title, .cc-title {
    font-size: 12px !important;
    letter-spacing: 1px !important;
    color: #ff9933 !important;
}
.sa-btn {
    font-size: 13px !important;
    color: #ccc !important;
    padding: 8px 12px !important;
}

/* ━━━ ステータスバー ━━━ */
#secStatusBar, .sec-status-bar {
    font-size: 12px !important;
    padding: 6px 16px !important;
    background: rgba(0, 10, 20, 0.95) !important;
    border-bottom: 1px solid rgba(0, 255, 136, 0.15) !important;
    color: #aaa !important;
    gap: 10px !important;
}
#secStatusBar span, .ssb-item {
    font-size: 12px !important;
    color: #bbb !important;
}
.ssb-clock {
    color: #00ff88 !important;
    font-weight: 700 !important;
}

/* ━━━ 浮遊ウィジェット位置＆サイズ整理 ━━━ */
/* ペットウィジェット：左下→より小さく */
.pet-widget {
    bottom: 16px !important;
    left: 16px !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    background: rgba(5, 10, 20, 0.95) !important;
    border: 1px solid rgba(255, 200, 0, 0.25) !important;
    z-index: 9990 !important;
}

/* ノートパッド：右下に移動して被らない */
.crypto-notepad {
    bottom: 16px !important;
    left: auto !important;
    right: 16px !important;
    width: 280px !important;
    z-index: 9990 !important;
}
.crypto-notepad.collapsed {
    width: auto !important;
}

/* FABボタン */
.quick-fab {
    bottom: 70px !important;
    right: 16px !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 22px !important;
}

/* セキュリティウィジェット：右上 */
.security-widget {
    top: 42px !important;
    right: 16px !important;
    font-size: 13px !important;
}

/* アクティビティログ */
.activity-panel {
    top: 42px !important;
}

/* ━━━ コマンド出力テキスト ━━━ */
.cmd-output, .output-area, pre, code, .result {
    color: #e0e0e0 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}
code, .mono, [style*="monospace"] {
    font-size: 13px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    color: #00ff88 !important;
}

/* ━━━ テーブル視認性 ━━━ */
table {
    border-collapse: collapse !important;
    width: 100% !important;
}
th {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
    font-weight: 700 !important;
    text-align: left !important;
}
td {
    color: #ddd !important;
    font-size: 13px !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* ━━━ カード＆パネル ━━━ */
.card, .panel, .box, [class*="card"], [class*="panel"] {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
}

/* ━━━ トースト通知 ━━━ */
.toast, .toast-notification {
    font-size: 14px !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
}

/* ━━━ ファイル暗号化ゾーン ━━━ */
.file-encrypt-zone {
    border: 1.5px solid rgba(0, 255, 136, 0.2) !important;
}
.fez-header {
    font-size: 15px !important;
    padding: 14px 18px !important;
    color: #00ff88 !important;
}
.fez-drop-text {
    font-size: 16px !important;
    color: #ddd !important;
}
.fez-input {
    font-size: 14px !important;
}

/* ━━━ HEXビューア ━━━ */
.hv-header {
    font-size: 15px !important;
    color: #9999ff !important;
}
.hv-hex { color: #33ff99 !important; font-size: 13px !important; }
.hv-ascii { color: #aaa !important; }

/* ━━━ 暗号ビジュアルの視認性向上 ━━━ */
.live-hash {
    font-size: 10px !important;
    color: #666 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    padding: 3px 8px !important;
}

/* ━━━ モーダル＆オーバーレイ ━━━ */
.shortcut-modal, .qr-modal-content, .typewriter-panel, 
.crypto-sandbox, .cipher-wheel-panel, .crypto-whiteboard {
    border: 1.5px solid rgba(0, 255, 136, 0.25) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7) !important;
}

/* ━━━ レスポンシブ追加修正 ━━━ */
@media (max-width: 768px) {
    body { font-size: 14px !important; }
    .pet-widget { display: none !important; }
    .crypto-notepad { width: 240px !important; }
    button { font-size: 13px !important; padding: 8px 14px !important; }
    h1 { font-size: 22px !important; }
    h2 { font-size: 18px !important; }
    #secStatusBar { font-size: 10px !important; padding: 4px 8px !important; }
}

/* ━━━ スクロールバー改善 ━━━ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 136, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 136, 0.4); }

/* ━━━ セレクション色 ━━━ */
::selection { background: rgba(0, 255, 136, 0.3); color: #fff; }
