/* ========== カラーテーマ設定 ========== */

/* Google Fonts - Kaisei Decol（懐石デコール） */
@import url('https://fonts.googleapis.com/css2?family=Kaisei+Decol:wght@400;500;700&display=swap');

:root {
    /* ライトモード */
    --bg-primary: #FFF8F0;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #2D2416;
    --text-secondary: #6B5D4F;
    --accent-primary: #FF6B35;
    --accent-secondary: #F7931E;
    --accent-warm: #FFB84D;
    --border-color: #E8DDD0;
    --shadow-sm: 0 2px 8px rgba(255, 107, 53, 0.08);
    --shadow-md: 0 4px 16px rgba(255, 107, 53, 0.12);
    --shadow-lg: 0 8px 24px rgba(255, 107, 53, 0.16);
}

body.dark-mode {
    /* ダークモード */
    --bg-primary: #1A1410;
    --bg-secondary: #2D2416;
    --bg-card: #3D3226;
    --text-primary: #F5EDE0;
    --text-secondary: #C4B5A0;
    --accent-primary: #FF8A5B;
    --accent-secondary: #FFA94D;
    --accent-warm: #FFD08A;
    --border-color: #4D4236;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ========== 基本スタイル ========== */
* { 
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; 
}

body { 
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    /* 背景画像（Unsplashの料理写真） */
    background-image: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=1920&q=80');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* 背景のオーバーレイとグラデーション */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ライトモード: 上部は透明、下部にかけて白のグラデーション */
    background: linear-gradient(
        to bottom,
        rgba(255, 248, 240, 0.75) 0%,
        rgba(255, 248, 240, 0.85) 40%,
        rgba(255, 248, 240, 0.95) 70%,
        rgba(255, 248, 240, 1) 100%
    );
    pointer-events: none;
    z-index: 0;
}

body.dark-mode::before {
    /* ダークモード: 上部は暗く、下部にかけて黒のグラデーション */
    background: linear-gradient(
        to bottom,
        rgba(26, 20, 16, 0.80) 0%,
        rgba(26, 20, 16, 0.90) 40%,
        rgba(26, 20, 16, 0.95) 70%,
        rgba(26, 20, 16, 1) 100%
    );
}

/* すべてのコンテンツをオーバーレイの上に表示 */
body > * {
    position: relative;
    z-index: 1;
}

body {
    padding-top: 70px; 
    padding-bottom: 60px; 
    color: var(--text-primary);
    line-height: 1.7;
}

/* ========== ヘッダー ========== */
header { 
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 70px; 
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center; 
    padding: 0 20px; 
    z-index: 1000;
    box-sizing: border-box;
}

body.dark-mode header {
    background: rgba(45, 36, 22, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#hamburger-btn { 
    font-size: 32px; 
    cursor: pointer; 
    user-select: none;
    color: var(--accent-primary);
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    justify-self: start;
}

#hamburger-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-secondary);
    transform: scale(1.1);
}

.site-title { 
    font-family: 'Kaisei Decol', serif;
    font-size: 1.6em; 
    font-weight: 700; 
    margin: 0;
    justify-self: center;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.08em;
    text-shadow: 2px 2px 4px rgba(255, 107, 53, 0.1);
}

/* ========== サイドメニュー ========== */
#side-menu { 
    height: 100%; 
    width: 280px; 
    position: fixed; 
    z-index: 1001; 
    top: 0; 
    left: -280px; 
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    overflow-x: hidden; 
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 70px;
    box-shadow: var(--shadow-lg);
}

#side-menu.open { left: 0; }

#side-menu a { 
    padding: 18px 25px; 
    text-decoration: none; 
    font-size: 1.15em; 
    color: var(--text-secondary);
    display: block; 
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 600;
}

#side-menu a:hover { 
    color: var(--accent-primary);
    background: var(--bg-primary);
    border-left-color: var(--accent-primary);
    padding-left: 35px;
}

#menu-close-btn { 
    position: absolute; 
    top: 15px; 
    right: 20px; 
    font-size: 36px; 
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

#menu-close-btn:hover {
    color: var(--accent-primary);
    transform: rotate(90deg);
}

/* ========== モーダル ========== */
#memo-modal { 
    display: none; 
    position: fixed; 
    z-index: 1002; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#memo-modal.show { display: block; }

.modal-content { 
    background: var(--bg-secondary);
    margin: 8% auto; 
    padding: 35px; 
    border: none;
    width: 85%; 
    max-width: 650px; 
    border-radius: 20px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

#modal-close-btn { 
    color: var(--text-secondary);
    position: absolute; 
    top: 20px; 
    right: 25px; 
    font-size: 32px; 
    font-weight: bold; 
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

#modal-close-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-secondary);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--accent-primary);
    font-size: 1.8em;
    margin-bottom: 25px;
    font-weight: 700;
}

#memo-textarea { 
    width: 100%; 
    height: 320px; 
    margin-top: 20px; 
    font-size: 1.05em; 
    padding: 18px; 
    box-sizing: border-box;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

#memo-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.memo-buttons { 
    display: flex; 
    justify-content: flex-end; 
    gap: 12px; 
    margin-top: 20px; 
}

.memo-buttons button { 
    color: white; 
    padding: 12px 28px; 
    border: none; 
    border-radius: 25px;
    cursor: pointer; 
    font-size: 1.05em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.memo-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#memo-save-btn { 
    background: linear-gradient(135deg, #28a745, #20c997);
}

#memo-save-btn:hover {
    background: linear-gradient(135deg, #218838, #1aa179);
}

#memo-clear-btn { 
    background: linear-gradient(135deg, #dc3545, #c82333);
}

#memo-clear-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
}

/* ========== 検索エリア ========== */
.search-area { 
    max-width: 900px; 
    margin: 30px auto; 
    padding: 35px; 
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

body.dark-mode .search-area {
    background: rgba(45, 36, 22, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-section { 
    margin-bottom: 25px; 
    padding-bottom: 25px; 
    border-bottom: 2px solid var(--border-color);
}

.search-section:last-child { 
    border-bottom: none; 
    margin-bottom: 0; 
    padding-bottom: 0; 
}

.search-section h2 { 
    margin-top: 0; 
    padding-bottom: 15px;
    color: var(--accent-primary);
    font-size: 1.4em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

#freeword-input { 
    width: 100%; 
    font-size: 1.15em; 
    padding: 15px 20px; 
    box-sizing: border-box; 
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

#freeword-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

#freeword-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ========== カテゴリー ========== */
.category { 
    margin-bottom: 20px; 
}

.category-toggle { 
    font-size: 1.2em; 
    font-weight: 700; 
    cursor: pointer; 
    user-select: none; 
    display: block; 
    padding: 12px 0;
    color: var(--text-primary);
    list-style: none;
}

.category-toggle::-webkit-details-marker { 
    display: none; 
}

.category-toggle::before { 
    content: '▶'; 
    display: inline-block; 
    margin-right: 12px; 
    transition: transform 0.3s ease;
    transform-origin: center;
    color: var(--accent-primary);
}

details[open] > .category-toggle::before { 
    transform: rotate(90deg); 
}

.ingredient-list, .seasoning-list { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    list-style: none; 
    padding: 15px 0 10px 20px; 
    animation: fadeIn 0.3s;
}

.ingredient-list label, .seasoning-list label { 
    display: block; 
    padding: 10px 18px; 
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer; 
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-primary);
}

.ingredient-list label:hover, .seasoning-list label:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.ingredient-list input[type="checkbox"]:checked + label { 
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: var(--accent-primary);
    color: white; 
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.seasoning-list input[type="checkbox"]:checked + label { 
    background: linear-gradient(135deg, #17a2b8, #138496);
    border-color: #17a2b8;
    color: white;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.ingredient-list input[type="checkbox"], 
.seasoning-list input[type="checkbox"] { 
    display: none; 
}

/* ========== 検索オプション ========== */
.search-options h3 { 
    margin-top: 0;
    color: var(--accent-primary);
    font-size: 1.2em;
    font-weight: 700;
}

.search-options div { 
    margin-bottom: 12px; 
}

.search-options input[type="radio"],
.search-options input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--accent-primary);
}

.search-options label { 
    margin-left: 8px; 
    cursor: pointer; 
    font-weight: normal;
    color: var(--text-primary);
}

.search-options .seasoning-option { 
    padding-top: 12px; 
    border-top: 1px solid var(--border-color);
    margin-top: 12px; 
}

/* ========== 検索ボタン ========== */
.search-button-container { 
    text-align: center; 
    margin-top: 25px; 
}

#search-button { 
    font-size: 1.3em; 
    padding: 15px 50px; 
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white; 
    border: none; 
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

#search-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

#search-button:active {
    transform: translateY(0);
}

/* ========== 結果表示エリア ========== */
#results-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.recipe-section { 
    margin-bottom: 40px; 
    padding-bottom: 30px;
    border-bottom: 3px solid var(--border-color);
}

.recipe-section:last-child {
    border-bottom: none;
}

.recipe-section h2 {
    color: var(--accent-primary);
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 5px solid var(--accent-primary);
}

.results-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 20px; 
    margin-top: 20px; 
}

.meal-card { 
    border: 2px solid var(--border-color);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    text-align: center; 
    padding: 15px; 
    text-decoration: none; 
    color: var(--text-primary);
    height: auto; 
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

body.dark-mode .meal-card {
    background: rgba(61, 50, 38, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.meal-card:hover { 
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.95);
}

body.dark-mode .meal-card:hover {
    background: rgba(61, 50, 38, 0.95);
}

.meal-card img { 
    width: 100%; 
    height: 160px; 
    object-fit: cover; 
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.meal-card img:hover { 
    opacity: 0.85;
    transform: scale(1.05);
}

.meal-card p { 
    font-size: 0.95em; 
    margin: 12px 0 0; 
    height: 2.7em; 
    white-space: normal; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== 楽天市場商品カード ========== */
.item-card {
    border: 2px solid var(--border-color);
    border-radius: 15px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    text-align: left;
    padding: 0;
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.item-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: white;
    padding: 10px;
}

.item-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 0.9em;
    margin: 0 0 10px 0;
    height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.item-price {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 5px 0;
}

.item-rating {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin: 5px 0;
}

.item-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: auto;
    text-align: center;
    transition: all 0.3s ease;
}

.item-card:hover .item-badge {
    transform: translateX(5px);
}

.items-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ========== フッター ========== */
footer { 
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--text-secondary);
    text-align: center; 
    padding: 20px 0; 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    font-size: 0.9em; 
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark-mode footer {
    background: rgba(45, 36, 22, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========== レスポンシブ対応 ========== */
@media (max-width: 768px) {
    .search-area {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    #search-button {
        font-size: 1.1em;
        padding: 12px 35px;
    }
    
    header {
        grid-template-columns: auto 1fr auto;
        padding: 0 10px;
    }
    
    .site-title {
        font-size: 1.1em;
        margin: 0 10px;
    }
    
    .header-buttons {
        gap: 6px;
        margin-right: 0;
    }
    
    #theme-toggle,
    #memo-btn {
        font-size: 18px;
        padding: 8px 10px;
        min-width: 42px;
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }
}

/* ========== AIレシピボタン ========== */
.ai-recipe-btn {
    font-size: 0.85em;
    padding: 8px 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.ai-recipe-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ai-recipe-btn:disabled {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========== AIレシピモーダルのスクロールバー ========== */
.ai-recipe-modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

.ai-recipe-modal-content::-webkit-scrollbar {
    width: 8px;
}

.ai-recipe-modal-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.ai-recipe-modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.ai-recipe-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* ========== ヘッダーボタンの修正（見切れ防止） ========== */
.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-self: end;
    margin-right: 0;
    padding-right: 0;
}

#theme-toggle,
#memo-btn {
    font-size: 22px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.15);
    flex-shrink: 0;
}

body.dark-mode #theme-toggle,
body.dark-mode #memo-btn {
    background: rgba(45, 36, 22, 0.9);
}

#theme-toggle:hover,
#memo-btn:hover {
    transform: scale(1.05);
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ========== SNSシェアボタン ========== */
#share-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-md);
}

body.dark-mode #share-section {
    background: rgba(45, 36, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.share-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* 各SNSボタンの色 */
.twitter-btn {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(26, 26, 26, 0.9));
    border-color: rgba(255, 255, 255, 0.2);
}

.twitter-btn:hover {
    background: linear-gradient(135deg, rgba(26, 26, 26, 1), rgba(51, 51, 51, 1));
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.facebook-btn {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.95), rgba(12, 99, 212, 0.95));
    border-color: rgba(255, 255, 255, 0.3);
}

.facebook-btn:hover {
    background: linear-gradient(135deg, rgba(12, 99, 212, 1), rgba(9, 82, 184, 1));
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.5);
}

.line-btn {
    background: linear-gradient(135deg, rgba(6, 199, 85, 0.95), rgba(5, 168, 71, 0.95));
    border-color: rgba(255, 255, 255, 0.3);
}

.line-btn:hover {
    background: linear-gradient(135deg, rgba(5, 168, 71, 1), rgba(4, 138, 58, 1));
    box-shadow: 0 8px 25px rgba(6, 199, 85, 0.5);
}

.copy-btn {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.95), rgba(75, 85, 99, 0.95));
    border-color: rgba(255, 255, 255, 0.3);
}

.copy-btn:hover {
    background: linear-gradient(135deg, rgba(75, 85, 99, 1), rgba(55, 65, 81, 1));
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.5);
}

.share-btn svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .share-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .share-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}/* ========== 言語セレクター ========== */
.language-selector {
    position: relative;
    margin-left: 8px;
}

#language-btn {
    font-size: 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.15);
    color: var(--text-primary);
}

body.dark-mode #language-btn {
    background: rgba(45, 36, 22, 0.9);
}

#language-btn:hover {
    transform: scale(1.05);
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

#language-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--accent-primary);
    color: white;
}

.lang-option .flag {
    font-size: 20px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #language-btn {
        min-width: 100px;
        height: 42px;
        font-size: 14px;
        padding: 8px 10px;
    }
    
    .language-dropdown {
        min-width: 140px;
    }
}