/* ═══════════════════════════════════════════════
   🔥 Next-Level Enhancement CSS
   ═══════════════════════════════════════════════ */

/* ━━━ ファイル暗号化ゾーン ━━━ */
.file-encrypt-zone {
    margin: 16px;
    border: 1px solid rgba(0,255,136,0.15);
    border-radius: 14px;
    background: rgba(0,20,30,0.6);
    backdrop-filter: blur(8px);
    overflow: hidden;
    transition: all 0.3s;
}
.file-encrypt-zone.collapsed .fez-body { display: none; }
.fez-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #00ff88;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    user-select: none;
}
.fez-header:hover { background: rgba(0,255,136,0.04); }
.fez-body { padding: 16px; }
.fez-dropzone {
    border: 2px dashed rgba(0,255,136,0.25);
    border-radius: 12px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0,255,136,0.02);
}
.fez-dropzone:hover, .fez-dropzone.dragover {
    border-color: #00ff88;
    background: rgba(0,255,136,0.08);
    transform: scale(1.01);
}
.fez-drop-icon { font-size: 36px; margin-bottom: 8px; }
.fez-drop-text { color: #ccc; font-size: 14px; }
.fez-drop-sub { color: #666; font-size: 11px; margin-top: 4px; }
.fez-password-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}
.fez-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #eee;
    font-size: 13px;
    outline: none;
}
.fez-input:focus { border-color: #00ff88; }
.fez-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.fez-btn.encrypt {
    background: linear-gradient(135deg, #00cc66, #00ff88);
    color: #000;
}
.fez-btn.decrypt {
    background: linear-gradient(135deg, #0088ff, #00ccff);
    color: #fff;
}
.fez-btn:hover { transform: scale(1.05); box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.fez-status {
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    min-height: 20px;
}
.fez-status.info { background: rgba(0,136,255,0.1); color: #00ccff; }
.fez-status.success { background: rgba(0,255,136,0.1); color: #00ff88; }
.fez-status.error { background: rgba(255,68,68,0.1); color: #ff4444; }
.fez-progress {
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}
.fez-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ccff);
    border-radius: 2px;
    width: 0;
    transition: width 0.4s;
}

/* ━━━ 暗号化ノートパッド ━━━ */
.crypto-notepad {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    background: rgba(10,15,25,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,204,255,0.2);
    border-radius: 14px;
    z-index: 9995;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    overflow: hidden;
    transition: all 0.3s;
}
.crypto-notepad.collapsed .np-body { display: none; }
.crypto-notepad.collapsed { width: auto; border-radius: 20px; }
.np-header {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #00ccff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    user-select: none;
}
.np-header:hover { background: rgba(0,204,255,0.05); }
.np-body { padding: 8px; }
.np-editor {
    width: 100%;
    height: 150px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #ddd;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}
.np-editor:focus { border-color: rgba(0,204,255,0.3); }
.np-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 0 4px;
}
.np-info { flex: 1; font-size: 10px; color: #555; }
.np-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #aaa;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.np-btn:hover { border-color: #00ccff; color: #00ccff; background: rgba(0,204,255,0.1); }

/* ━━━ HEXビューア ━━━ */
.hex-viewer {
    margin: 16px;
    border: 1px solid rgba(136,136,255,0.15);
    border-radius: 14px;
    background: rgba(0,10,30,0.6);
    overflow: hidden;
}
.hex-viewer.collapsed .hv-body { display: none; }
.hv-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #8888ff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    user-select: none;
}
.hv-header:hover { background: rgba(136,136,255,0.04); }
.hv-body { padding: 12px; }
.hv-input {
    width: 100%;
    height: 60px;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(136,136,255,0.15);
    border-radius: 8px;
    color: #ccc;
    font-size: 12px;
    resize: none;
    outline: none;
    box-sizing: border-box;
}
.hv-input:focus { border-color: rgba(136,136,255,0.4); }
.hv-output {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    line-height: 1.5;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}
.hv-hex { color: #00ff88; white-space: pre; }
.hv-ascii { color: #888; white-space: pre; }
.hv-offset { color: #555; }
.hv-placeholder { color: #444; }
.hv-info { margin-top: 6px; font-size: 10px; color: #555; text-align: right; }

/* ━━━ QRモーダル ━━━ */
.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}
.qr-modal-content {
    background: rgba(15,25,40,0.98);
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    max-width: 320px;
}
.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #00ff88;
    margin-bottom: 16px;
}
.qr-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
}
.qr-close-btn:hover { color: #ff4444; }
.qr-image { border-radius: 8px; background: white; padding: 8px; }
.qr-info { margin-top: 12px; font-size: 11px; color: #666; }
.qr-btn {
    position: absolute;
    top: 4px;
    left: 8px;
    background: rgba(0,0,0,0.5);
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.qr-btn:hover { opacity: 1; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ━━━ セキュリティレーティング ━━━ */
.sec-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sec-rating-grade {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.sec-rating-label {
    font-size: 9px;
    color: #555;
    text-transform: uppercase;
}

/* ━━━ 3D回転ロック ━━━ */
.lock-3d {
    display: inline-block;
    perspective: 200px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin-right: 8px;
}
.lock-3d-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}
.lock-3d:hover .lock-3d-inner { transform: rotateY(90deg); }
.lock-3d.spinning .lock-3d-inner { animation: lockSpin 2s linear infinite; }
.lock-3d-face {
    position: absolute;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    backface-visibility: hidden;
}
.lock-3d-face.front { transform: translateZ(11px); }
.lock-3d-face.back { transform: rotateY(180deg) translateZ(11px); }
.lock-3d-face.left { transform: rotateY(-90deg) translateZ(11px); }
.lock-3d-face.right { transform: rotateY(90deg) translateZ(11px); }
@keyframes lockSpin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }

/* ━━━ ライブハッシュ表示 ━━━ */
.live-hash {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 9px;
    color: #444;
    font-family: 'SF Mono', monospace;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* ━━━ レスポンシブ ━━━ */
@media (max-width: 768px) {
    .crypto-notepad { left: 8px; bottom: 8px; width: 280px; }
    .fez-password-row { flex-wrap: wrap; }
    .hex-viewer { margin: 8px; }
}
