/* ========================================
   ポータルサイト - スタイルシート
   ======================================== */

/* CSS Custom Properties (テーマ変数) */
:root {
    /* ライトテーマ (デフォルト) */
    --color-bg: #ffffff;
    --color-bg-secondary: #f5f5f5;
    --color-bg-tertiary: #e8e8e8;
    --color-text: #1a1a1a;
    --color-text-secondary: #666666;
    --color-text-muted: #999999;
    --color-primary: #0066cc;
    --color-primary-hover: #0052a3;
    --color-border: #dddddd;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-card-bg: #ffffff;
    --color-header-bg: #ffffff;
    --color-footer-bg: #f8f8f8;

    /* 共通 */
    --font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: 0.3s ease;
    --max-width: 1200px;
    --header-height: 60px;
}

/* ダークテーマ */
[data-theme="dark"] {
    --color-bg: #1a1a1a;
    --color-bg-secondary: #2d2d2d;
    --color-bg-tertiary: #404040;
    --color-text: #f0f0f0;
    --color-text-secondary: #e0e0e0;
    --color-text-muted: #a0a0a0;
    --color-primary: #C0C0C0;
    /* Metallic Silver */
    --color-primary-hover: #ffffff;
    /* White shine */
    --color-border: #404040;
    --color-shadow: rgba(0, 0, 0, 0.3);
    --color-card-bg: #2d2d2d;
    --color-header-bg: #242424;
    --color-footer-bg: #242424;
}

html[data-theme="dark"] .nav-btn--primary,
html[data-theme="dark"] .btn--primary,
html[data-theme="dark"] .search-popup__submit {
    /* Chrome-like gradient: Dark -> Light -> Dark */
    background: linear-gradient(135deg, #757575 0%, #e0e0e0 40%, #ffffff 50%, #e0e0e0 60%, #757575 100%);
    background-size: 200% 200%;
    border: 1px solid #c0c0c0;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .nav-btn--primary:hover,
html[data-theme="dark"] .btn--primary:hover,
html[data-theme="dark"] .search-popup__submit:hover {
    background-position: 100% 0;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.6);
    color: #000000;
}

/* ========================================
   リセット & ベース
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: background-color var(--transition), color var(--transition);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* ========================================
   ヘッダー
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Glassmorphism Effect */
    background-color: rgba(255, 255, 255, 0.15);
    /* Transparency 0.15 as requested */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Glass Header */
[data-theme="dark"] .header {
    background-color: rgba(36, 36, 36, 0.1);
    /* Transparency 0.1 as requested */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 1.8rem;
    /* Larger */
    font-weight: 800;
    color: var(--color-text);
    background: linear-gradient(135deg, #0066cc, #00aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Stronger dark shadow for light mode */
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

html[data-theme="dark"] .logo-text {
    background: linear-gradient(135deg, #757575 0%, #e0e0e0 45%, #ffffff 50%, #e0e0e0 55%, #757575 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Montserrat', 'Zen Kaku Gothic New', sans-serif;
    letter-spacing: 0.05em;
    /* White glow for dark mode visibility */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

html[data-theme="dark"] .nav-btn--primary {
    font-family: 'Montserrat', 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
}

.header__nav {
    display: flex;
    gap: 12px;
}

.nav-btn {
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-btn--primary {
    background-color: var(--color-primary);
    color: #ffffff;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color var(--transition), box-shadow var(--transition);
}

.nav-btn--primary:hover {
    background-color: var(--color-primary-hover);
    color: #ffffff;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: background-color var(--transition);
}

.icon-btn:hover {
    background-color: var(--color-bg-secondary);
}

/* 9ドットメニュー */
.apps-menu {
    position: absolute;
    top: calc(var(--header-height) + 8px);
    right: 20px;
    width: 320px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px var(--color-shadow);
    padding: 10px;
    display: none;
    animation: fadeIn 0.2s ease;
}

.apps-menu.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.apps-menu__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.apps-menu__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: var(--border-radius);
    color: var(--color-text);
    transition: background-color var(--transition);
}

.apps-menu__item:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-text);
}

.apps-menu__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.apps-menu__item span {
    font-size: 0.75rem;
    text-align: center;
}

/* 検索ポップアップ */
.search-popup {
    position: absolute;
    top: calc(var(--header-height) + 8px);
    right: 70px;
    width: 400px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px var(--color-shadow);
    padding: 16px;
    display: none;
    animation: fadeIn 0.2s ease;
}

.search-popup.active {
    display: block;
}

.search-popup__form {
    display: flex;
    gap: 8px;
}

.search-popup__input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition);
}

.search-popup__input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-popup__submit {
    padding: 12px 24px;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color var(--transition), box-shadow var(--transition);
}

.search-popup__submit:hover {
    background-color: var(--color-primary-hover);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

/* ========================================
   メインコンテンツ
   ======================================== */
.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px;
}

/* ヒーローセクション */
.hero {
    margin-bottom: 32px;
}

.hero__image {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background-color: var(--color-bg-secondary);
    border: 2px solid var(--color-border);
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
    text-align: center;
    padding: 20px;
}

.hero__title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.hero__subtitle {
    color: #ffffff;
    font-size: 1.2rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}

.hero__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

/* ========================================
   ヒーローカルーセル
   ======================================== */
.hero-carousel {
    position: relative;
    width: 100%;
    /* 全幅表示 */
    margin: 0 auto;
    border-radius: var(--border-radius-lg);
    background-color: #000;
    /* 隙間を黒い帯に */
    border: 2px solid var(--color-border);
    aspect-ratio: 21 / 9;
    /* アスペクト比固定 */
    display: flex;
    overflow: hidden;
}

.hero-carousel__track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.hero-carousel__slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

.hero-carousel__slide img,
.hero-carousel__slide a img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* アスペクト比を維持して収める */
    background-color: #000;
}

.hero-carousel .hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
    text-align: center;
    padding: 20px;
    pointer-events: none;
    z-index: 10;
}

.hero-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 15px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 20;
    border-radius: 4px;
}

.hero-carousel__btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.hero-carousel__btn--prev {
    left: 10px;
}

.hero-carousel__btn--next {
    right: 10px;
}

.hero-carousel__dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.hero-carousel__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.hero-carousel__dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.hero-carousel__dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* コンテンツグリッド */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    margin-bottom: 32px;
}

/* ニュースセクション */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
    line-height: normal;
}

.section-title a,
.sidebar__title a {
    transition: opacity var(--transition);
}

.section-title a:hover,
.sidebar__title a:hover {
    opacity: 0.7;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    transition: box-shadow var(--transition), transform var(--transition);
}

.news-card:hover {
    box-shadow: 0 4px 16px var(--color-shadow);
    transform: translateY(-2px);
}

.news-card__image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
}

.news-card__image.no-image::after {
    content: '画像挿入';
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card__content {
    flex: 1;
    min-width: 0;
}

.news-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.news-card__excerpt {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* サイドバー */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 50px;
    /* 最新ニュースより少し下げる */
}

.sidebar__section {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    /* 枠を復活 */
    border-radius: var(--border-radius-lg);
    /* 角丸を他と合わせる */
    padding: 20px;
}

.sidebar__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
    /* タイトルの下線も復活 */
    line-height: 1.5;
}

.sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar__link {
    display: block;
    padding: 10px 12px;
    background-color: var(--color-bg-secondary);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--color-text);
    transition: background-color var(--transition);
}

.sidebar__link:hover {
    background-color: var(--color-bg-tertiary);
    color: var(--color-text);
}

/* 今日は何の日 */
.today-section {
    margin-bottom: 24px;
}

.today-card {
    background-color: var(--color-card-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    text-align: center;
}

.today-card__title {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.today-card__content {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
}

/* 毎日雑学 */
.trivia-section {
    margin-bottom: 32px;
}

.trivia-card {
    position: relative;
    background-color: var(--color-card-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 32px;
}

.trivia-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

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

.trivia-card__question {
    display: inline-block;
    padding: 16px 32px;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: var(--border-radius);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.trivia-card__btn {
    display: block;
    margin: 0 auto;
    padding: 10px 24px;
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.trivia-card__btn:hover {
    background-color: var(--color-primary-hover);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.trivia-card__answer {
    margin-top: 16px;
    padding: 16px;
    background-color: var(--color-bg-secondary);
    border-radius: var(--border-radius);
    font-size: 1.125rem;
    font-weight: 600;
}

.trivia-card__icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* ページネーション */
.pagination {
    text-align: center;
    padding: 24px 0;
}

.pagination__label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.pagination__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pagination__arrow {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    background-color: var(--color-card-bg);
    font-size: 1rem;
    transition: all var(--transition);
}

.pagination__arrow:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.pagination__arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination__numbers {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ========================================
   フッター
   ======================================== */
.footer {
    background-color: var(--color-footer-bg);
    border-top: 1px solid var(--color-border);
    padding: 20px 0;
    margin-top: 40px;
}

.footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer__link {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.footer__link:hover {
    color: var(--color-primary);
}

/* ========================================
   Global Dark Theme (Games Style)
   ======================================== */
html[data-theme="dark"] body {
    background: radial-gradient(circle at top right, rgba(234, 179, 8, 0.05), transparent 400px),
        linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%) !important;
    background-attachment: fixed !important;
}

[data-theme="dark"] body .header,
[data-theme="dark"] body .footer {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

[data-theme="dark"] body .page-title {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.4), 2px 2px 4px rgba(234, 179, 8, 0.3);
}

[data-theme="dark"] body .page-description {
    color: #cbd5e1;
}

.share-btn {
    padding: 8px 16px;
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--color-text);
    transition: background-color var(--transition);
}

.share-btn:hover {
    background-color: var(--color-bg-tertiary);
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 768px) {
    .header__nav {
        display: none;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero__image {
        height: 200px;
    }

    .news-card {
        flex-direction: column;
    }

    .news-card__image {
        width: 100%;
        height: 160px;
    }

    .search-popup {
        right: 20px;
        width: calc(100% - 40px);
    }

    .hero-carousel {
        width: 100%;
        margin: 0;
        border-radius: 0;
        aspect-ratio: 2.5 / 1;
    }

    .hero-carousel__slide img,
    .hero-carousel__slide a {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-carousel__btn {
        padding: 10px 8px;
        font-size: 1rem;
    }

    .trivia-card__icon {
        position: static;
        transform: none;
        margin: 16px auto 0;
    }
}

/* ========================================
   Amazing Theme Toggle Button
   ======================================== */
.theme-toggle {
    position: relative;
    width: 64px;
    height: 32px;
    padding: 0;
    border-radius: 32px;
    background: linear-gradient(135deg, #83D8FF, #4FA8FF);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

html[data-theme="dark"] .theme-toggle {
    background: linear-gradient(135deg, #1A2744, #0D1424);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(192, 192, 192, 0.2);
}

.theme-toggle__track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Clouds for Day */
.theme-toggle::before {
    content: '';
    position: absolute;
    top: 60%;
    left: 20%;
    width: 12px;
    height: 4px;
    background: white;
    border-radius: 4px;
    opacity: 0.8;
    transition: 0.5s;
    box-shadow: 10px -4px 0 2px white, 20px 2px 0 0 white;
}

html[data-theme="dark"] .theme-toggle::before {
    top: 30%;
    left: 40%;
    width: 2px;
    height: 2px;
    background: #FFF;
    border-radius: 50%;
    box-shadow: 10px 8px 0 0.5px #fff, 20px -2px 0 0 #fff, 30px 6px 0 1px #fff;
    /* Stars */
    opacity: 0.6;
}

.theme-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 10px rgba(255, 215, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

html[data-theme="dark"] .theme-toggle__thumb {
    transform: translateX(32px);
    background: #E0E0E0;
    box-shadow: inset -3px -3px 6px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Crater for Moon */
.theme-toggle__thumb::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 6px 4px 0 1px rgba(0, 0, 0, 0.1), 2px 8px 0 0.5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.5s;
}

html[data-theme="dark"] .theme-toggle__thumb::after {
    opacity: 1;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.4s ease;
}

.theme-toggle .icon-sun {
    color: #FFF;
    opacity: 1;
    transform: scale(1);
    mix-blend-mode: overlay;
}

.theme-toggle .icon-moon {
    color: #1A1A1A;
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

html[data-theme="dark"] .theme-toggle .icon-sun {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

html[data-theme="dark"] .theme-toggle .icon-moon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.theme-toggle:hover {
    transform: scale(1.05);
}