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

.tool-results-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.tool-results-sticky::-webkit-scrollbar { width: 6px; }
.tool-results-sticky::-webkit-scrollbar-thumb { background: rgba(150,150,150,0.3); border-radius: 4px; }

/* --- プレビューエリア (ライトカラー標準) --- */
#preview-stage {
    background-color: #f8f9fa;
    background-image: radial-gradient(rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 24px 24px;
    position: relative;
    padding: 2rem;
    overflow: hidden;
    color: #212529; /* 基本は黒文字 */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- コード出力用 --- */
.code-output { 
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace; 
    font-size: 0.85rem; 
    resize: none; 
    background-color: #1e1e1e; 
    color: #d4d4d4;
    white-space: pre; 
    overflow-x: auto; 
    border-color: var(--bs-border-color-translucent);
    line-height: 1.5;
}

/* --- アコーディオンとプリセットボタン --- */
.accordion-button:focus {
    box-shadow: none;
}
.accordion-button:not(.collapsed) {
    color: var(--bs-primary);
    background-color: transparent;
    box-shadow: inset 0 -1px 0 var(--bs-border-color);
}
.accordion-item {
    background-color: transparent;
}

.preset-group-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--bs-secondary-color);
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    width: 100%;
}

.preset-btn {
    width: auto; padding: 4px 10px; border-radius: 0.375rem; 
    border: 1px solid var(--bs-border-color);
    cursor: pointer; transition: all 0.2s; box-shadow: var(--bs-box-shadow-sm);
    background-color: var(--bs-body-bg); 
    font-size: 0.75rem; 
    color: var(--bs-body-color);
}
.preset-btn:hover { 
    border-color: var(--bs-primary); 
    transform: translateY(-2px); 
    color: var(--bs-primary); 
    font-weight: bold; 
    background-color: var(--bs-primary-bg-subtle);
}

/* --- 履歴＆フローティングボタン --- */
.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; }

.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; }