/* 共通スタイル */
.stylish-heading {
    font-weight: 700;
    line-height: 1.4;
    margin: 1.5em 0 1em;
    transition: all 0.3s ease;
}

/* アンダーライン */
.stylish-heading-underline {
    position: relative;
    padding-bottom: 0.5em;
    border-bottom: 3px solid var(--accent-color, #4A90E2);
}

.stylish-heading-underline::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color, #4A90E2);
    opacity: 0.5;
}

/* 左ボーダー */
.stylish-heading-left-border {
    position: relative;
    padding-left: 1.2em;
    border-left: 5px solid var(--accent-color, #4A90E2);
}

.stylish-heading-left-border::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-color, #4A90E2), transparent);
}

/* 背景グラデーション */
.stylish-heading-gradient {
    padding: 0.8em 1.2em;
    background: linear-gradient(135deg, 
        var(--accent-color, #4A90E2) 0%, 
        rgba(74, 144, 226, 0.6) 100%);
    color: white !important;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* ダブルライン */
.stylish-heading-double-line {
    position: relative;
    padding: 0.5em 0;
    border-top: 3px solid var(--accent-color, #4A90E2);
    border-bottom: 3px solid var(--accent-color, #4A90E2);
}

.stylish-heading-double-line::before,
.stylish-heading-double-line::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-color, #4A90E2);
    opacity: 0.5;
}

.stylish-heading-double-line::before {
    top: 6px;
}

.stylish-heading-double-line::after {
    bottom: 6px;
}

/* ドット装飾 */
.stylish-heading-dots {
    position: relative;
    padding-left: 1.5em;
}

.stylish-heading-dots::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--accent-color, #4A90E2);
    border-radius: 50%;
    box-shadow: 
        0 -20px 0 var(--accent-color, #4A90E2),
        0 20px 0 var(--accent-color, #4A90E2);
}

/* ストライプ */
.stylish-heading-stripe {
    position: relative;
    padding: 0.6em 1em;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(74, 144, 226, 0.1) 10px,
        rgba(74, 144, 226, 0.1) 20px
    );
    border-left: 4px solid var(--accent-color, #4A90E2);
    border-radius: 0 8px 8px 0;
}

/* 波線アンダーライン */
.stylish-heading-wave-underline {
    position: relative;
    padding-bottom: 0.7em;
}

.stylish-heading-wave-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: 
        repeating-linear-gradient(
            90deg,
            var(--accent-color, #4A90E2) 0px,
            var(--accent-color, #4A90E2) 10px,
            transparent 10px,
            transparent 20px
        ),
        repeating-linear-gradient(
            180deg,
            var(--accent-color, #4A90E2) 0px,
            transparent 4px
        );
    background-size: 20px 8px, 100% 8px;
}

/* コーナー装飾 */
.stylish-heading-corner {
    position: relative;
    padding: 0.5em 1em;
}

.stylish-heading-corner::before,
.stylish-heading-corner::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--accent-color, #4A90E2);
}

.stylish-heading-corner::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.stylish-heading-corner::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* 背景ボックス */
.stylish-heading-box {
    padding: 0.8em 1.2em;
    background: rgba(74, 144, 226, 0.1);
    border: 2px solid var(--accent-color, #4A90E2);
    border-radius: 8px;
}

/* リボン風 */
.stylish-heading-ribbon {
    position: relative;
    padding: 0.8em 1.5em;
    background: var(--accent-color, #4A90E2);
    color: white !important;
    margin-left: 20px;
}

.stylish-heading-ribbon::before,
.stylish-heading-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
}

.stylish-heading-ribbon::before {
    left: -20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 100% 20px;
    border-color: transparent transparent var(--accent-color, #4A90E2) transparent;
}

.stylish-heading-ribbon::after {
    right: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 50% 0 50% 10px;
    border-color: transparent transparent transparent var(--accent-color, #4A90E2);
}

/* タグ風 */
.stylish-heading-tag {
    position: relative;
    display: inline-block;
    padding: 0.6em 1.5em 0.6em 1em;
    background: var(--accent-color, #4A90E2);
    color: white !important;
    border-radius: 0 4px 4px 0;
}

.stylish-heading-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    margin-left: 5px;
}

.stylish-heading-tag::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 1.5em 0 1.5em 15px;
    border-color: transparent transparent transparent var(--accent-color, #4A90E2);
}

/* バッジ風 */
.stylish-heading-badge {
    display: inline-block;
    padding: 0.6em 1.5em;
    background: var(--accent-color, #4A90E2);
    color: white !important;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

/* 吹き出し */
.stylish-heading-speech-bubble {
    position: relative;
    padding: 0.8em 1.2em;
    background: var(--accent-color, #4A90E2);
    color: white !important;
    border-radius: 12px;
    margin-bottom: 20px;
}

.stylish-heading-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0 0;
    border-color: var(--accent-color, #4A90E2) transparent transparent transparent;
}

/* シャドウ */
.stylish-heading-shadow {
    padding: 0.5em 0;
    text-shadow: 
        3px 3px 0 rgba(74, 144, 226, 0.3),
        6px 6px 0 rgba(74, 144, 226, 0.2);
}

/* 3D効果 */
.stylish-heading-effect-3d {
    padding: 0.5em 0;
    text-shadow: 
        1px 1px 0 var(--accent-color, #4A90E2),
        2px 2px 0 var(--accent-color, #4A90E2),
        3px 3px 0 var(--accent-color, #4A90E2),
        4px 4px 0 var(--accent-color, #4A90E2),
        5px 5px 10px rgba(0, 0, 0, 0.3);
    transform: translateZ(0);
}

/* ネオン風 */
.stylish-heading-neon {
    padding: 0.5em 0;
    color: var(--accent-color, #4A90E2) !important;
    text-shadow: 
        0 0 5px var(--accent-color, #4A90E2),
        0 0 10px var(--accent-color, #4A90E2),
        0 0 20px var(--accent-color, #4A90E2),
        0 0 40px var(--accent-color, #4A90E2);
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* グロー */
.stylish-heading-glow {
    padding: 0.8em 1.2em;
    background: rgba(74, 144, 226, 0.2);
    color: var(--accent-color, #4A90E2) !important;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(74, 144, 226, 0.4),
        inset 0 0 20px rgba(74, 144, 226, 0.2);
}

/* グリッチ */
.stylish-heading-glitch {
    position: relative;
    padding: 0.5em 0;
}

.stylish-heading-glitch::before,
.stylish-heading-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stylish-heading-glitch::before {
    color: #ff00de;
    animation: glitch-1 0.3s infinite;
}

.stylish-heading-glitch::after {
    color: #00ffff;
    animation: glitch-2 0.3s infinite;
}

@keyframes glitch-1 {
    0% { clip-path: inset(40% 0 61% 0); }
    20% { clip-path: inset(92% 0 1% 0); }
    40% { clip-path: inset(43% 0 1% 0); }
    60% { clip-path: inset(25% 0 58% 0); }
    80% { clip-path: inset(54% 0 7% 0); }
    100% { clip-path: inset(58% 0 43% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(65% 0 15% 0); }
    20% { clip-path: inset(12% 0 78% 0); }
    40% { clip-path: inset(47% 0 23% 0); }
    60% { clip-path: inset(85% 0 3% 0); }
    80% { clip-path: inset(39% 0 39% 0); }
    100% { clip-path: inset(14% 0 71% 0); }
}

/* ジグザグボーダー */
.stylish-heading-zigzag {
    position: relative;
    padding: 0.8em 1em 1.2em;
}

.stylish-heading-zigzag::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: 
        linear-gradient(135deg, var(--accent-color, #4A90E2) 25%, transparent 25%),
        linear-gradient(225deg, var(--accent-color, #4A90E2) 25%, transparent 25%);
    background-size: 20px 10px;
    background-repeat: repeat-x;
}

/* ブラケット */
.stylish-heading-bracket {
    position: relative;
    padding: 0.5em 1.5em;
}

.stylish-heading-bracket::before,
.stylish-heading-bracket::after {
    content: '';
    position: absolute;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color, #4A90E2);
}

.stylish-heading-bracket::before {
    left: 0;
    box-shadow: -10px 0 0 var(--accent-color, #4A90E2);
}

.stylish-heading-bracket::after {
    right: 0;
    box-shadow: 10px 0 0 var(--accent-color, #4A90E2);
}

/* 引用符 */
.stylish-heading-quote {
    position: relative;
    padding: 0.5em 0 0.5em 2em;
}

.stylish-heading-quote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -0.2em;
    font-size: 3em;
    color: var(--accent-color, #4A90E2);
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* スター装飾 */
.stylish-heading-star {
    position: relative;
    padding: 0.5em 0 0.5em 2.5em;
}

.stylish-heading-star::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8em;
    color: var(--accent-color, #4A90E2);
}

.stylish-heading-star::after {
    content: '★';
    position: absolute;
    left: 0.8em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    color: var(--accent-color, #4A90E2);
    opacity: 0.6;
}

/* サークル */
.stylish-heading-circle {
    position: relative;
    padding: 0.5em 0 0.5em 2.5em;
}

.stylish-heading-circle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--accent-color, #4A90E2);
    border-radius: 50%;
    opacity: 0.2;
}

.stylish-heading-circle::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--accent-color, #4A90E2);
    border-radius: 50%;
    opacity: 0.4;
}

/* ペーパー風 */
.stylish-heading-paper {
    position: relative;
    padding: 0.8em 1.2em;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stylish-heading-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: repeating-linear-gradient(
        90deg,
        var(--accent-color, #4A90E2),
        var(--accent-color, #4A90E2) 10px,
        transparent 10px,
        transparent 20px
    );
}

/* ホバーエフェクト（エディタ外のみ） */
.stylish-heading:not(.is-selected):hover {
    transform: translateX(5px);
}

.stylish-heading-gradient:not(.is-selected):hover {
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    transform: translateY(-2px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .stylish-heading {
        font-size: 1.2em !important;
    }
    
    .stylish-heading-gradient,
    .stylish-heading-stripe {
        padding: 0.5em 0.8em;
    }
}

/* フォントファミリー */
.font-default {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* Google Fonts - ゴシック体 */
.font-noto-sans {
    font-family: "Noto Sans JP", sans-serif;
}

.font-zen-kaku {
    font-family: "Zen Kaku Gothic New", sans-serif;
}

.font-kosugi {
    font-family: "Kosugi", sans-serif;
}

.font-sawarabi-gothic {
    font-family: "Sawarabi Gothic", sans-serif;
}

/* Google Fonts - 丸ゴシック */
.font-mplus-rounded {
    font-family: "M PLUS Rounded 1c", sans-serif;
}

.font-kosugi-maru {
    font-family: "Kosugi Maru", sans-serif;
}

.font-zen-maru {
    font-family: "Zen Maru Gothic", sans-serif;
}

.font-kiwi-maru {
    font-family: "Kiwi Maru", serif;
}

/* Google Fonts - 明朝体 */
.font-noto-serif {
    font-family: "Noto Serif JP", serif;
}

.font-shippori-mincho {
    font-family: "Shippori Mincho", serif;
}

.font-sawarabi-mincho {
    font-family: "Sawarabi Mincho", serif;
}

.font-kaisei-decol {
    font-family: "Kaisei Decol", serif;
}

/* Google Fonts - 個性的 */
.font-potta-one {
    font-family: "Potta One", sans-serif;
    font-weight: 400;
}

.font-yusei-magic {
    font-family: "Yusei Magic", sans-serif;
}

.font-rampart-one {
    font-family: "Rampart One", sans-serif;
    font-weight: 400;
}

.font-reggae-one {
    font-family: "Reggae One", sans-serif;
    font-weight: 400;
}

.font-rocknroll-one {
    font-family: "RocknRoll One", sans-serif;
    font-weight: 400;
}

.font-hachi-maru {
    font-family: "Hachi Maru Pop", sans-serif;
    font-weight: 400;
}

/* システムフォント */
.font-gothic {
    font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Meiryo, メイリオ, "MS PGothic", sans-serif;
}

.font-mincho {
    font-family: "Hiragino Mincho ProN", "ヒラギノ明朝 ProN W3", "YuMincho", "Yu Mincho", "游明朝", "MS PMincho", serif;
}

.font-maru-gothic {
    font-family: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN W4", "メイリオ", Meiryo, sans-serif;
}

/* 欧文フォント */
.font-serif {
    font-family: Georgia, "Times New Roman", Times, serif;
}

.font-sans-serif {
    font-family: Arial, Helvetica, "Helvetica Neue", sans-serif;
}

.font-cursive {
    font-family: "Comic Sans MS", "Apple Chancery", cursive;
}

.font-monospace {
    font-family: "Courier New", Courier, monospace;
}

/* テキスト配置 */
.text-align-left {
    text-align: left;
}

.text-align-center {
    text-align: center;
}

.text-align-right {
    text-align: right;
}