/* =================================================================
 * Page Specific Styles for Glassmorphism Generator (style.css)
 * ================================================================= */

/* --- 右カラム追従 (Sticky) 設定 --- */
.tool-results-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* --- プレビューキャンバス --- */
#preview-container {
    position: relative;
    overflow: hidden; /* 動く背景を収める */
    background-color: #3b82f6; /* デフォルト背景 */
    z-index: 1;
}

/* 背後で動くダミー要素 */
.bg-blob {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    animation: blob-move 10s infinite alternate ease-in-out;
}
.blob-1 { background: #f472b6; top: 10%; left: 10%; }
.blob-2 { background: #fbbf24; bottom: 10%; right: 10%; animation-delay: -2s; }
.blob-3 { background: #22d3ee; top: 50%; left: 40%; animation-delay: -5s; }

@keyframes blob-move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 30px) scale(1.2); }
}

/* --- ジェネレート対象 (プレビューボックス) --- */
#preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.25rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}
#preview-box h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: bold;
}

/* --- 出力エリア --- */
.code-output { 
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace; 
    font-size: 0.9rem; 
    background-color: var(--bs-tertiary-bg); 
    line-height: 1.5;
    border-color: var(--bs-border-color-translucent);
}

/* --- 履歴＆プリセットボタン --- */
.history-btn-wrapper { position: relative; display: inline-block; }
.history-delete-btn {
    position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
    background: var(--bs-danger); color: white; border-radius: 50%; font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 2px solid var(--bs-body-bg); opacity: 0; transition: opacity 0.2s;
}
.history-btn-wrapper:hover .history-delete-btn { opacity: 1; }

.preset-btn {
    width: 44px; height: 44px; border-radius: 0.375rem; border: 2px solid transparent;
    cursor: pointer; padding: 0; transition: all 0.2s; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.preset-btn:hover { 
    border-color: var(--bs-primary); 
    transform: translateY(-2px);
}

/* --- フローティング保存ボタン --- */
/* サイズと形状を強制的に固定して崩れを防ぐ */
.floating-save-btn {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 60px !important;
    height: 60px !important;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    padding: 0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.floating-save-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.3) !important;
}

/* --- フォームパーツの視認性向上 --- */
.form-label {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.form-range::-webkit-slider-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background: var(--bs-primary);
    border: 2px solid var(--bs-body-bg);
}
.form-range::-webkit-slider-runnable-track {
    background-color: var(--bs-border-color-translucent);
    height: 8px;
    border-radius: 4px;
}
.form-control-color {
    cursor: pointer;
}
.badge.bg-secondary-subtle {
    font-size: 0.85rem !important;
    font-weight: 600;
    padding: 0.4em 0.75em;
    border: 1px solid var(--bs-border-color-translucent);
}