/* リセットとベース */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ライトモード（デフォルト） */
    --bg-gradient-1: #667eea;
    --bg-gradient-2: #764ba2;
    --bg-gradient-3: #f093fb;
    --menu-bg: rgba(255, 255, 255, 0.85);
    --menu-text: #333;
    --menu-hover: rgba(0, 0, 0, 0.1);
    --window-bg: rgba(255, 255, 255, 0.95);
    --window-header: linear-gradient(180deg, #f6f6f6 0%, #e8e8e8 100%);
    --window-border: rgba(0, 0, 0, 0.1);
    --window-title: #333;
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-muted: #86868b;
    --card-bg: #f5f5f7;
    --card-hover: #e8e8ed;
    --dock-bg: rgba(255, 255, 255, 0.3);
    --dock-border: rgba(255, 255, 255, 0.4);
    --dock-icon-bg: rgba(255, 255, 255, 0.9);
    --avatar-gradient-1: #667eea;
    --avatar-gradient-2: #764ba2;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-gradient-1: #1a1a2e;
        --bg-gradient-2: #16213e;
        --bg-gradient-3: #0f3460;
        --menu-bg: rgba(30, 30, 30, 0.85);
        --menu-text: #e0e0e0;
        --menu-hover: rgba(255, 255, 255, 0.1);
        --window-bg: rgba(40, 40, 40, 0.95);
        --window-header: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
        --window-border: rgba(255, 255, 255, 0.1);
        --window-title: #e0e0e0;
        --text-primary: #f5f5f7;
        --text-secondary: #a1a1a6;
        --text-muted: #86868b;
        --card-bg: rgba(60, 60, 60, 0.6);
        --card-hover: rgba(80, 80, 80, 0.6);
        --dock-bg: rgba(50, 50, 50, 0.5);
        --dock-border: rgba(255, 255, 255, 0.1);
        --dock-icon-bg: rgba(60, 60, 60, 0.9);
        --avatar-gradient-1: #667eea;
        --avatar-gradient-2: #764ba2;
    }
}

/* 強制ライトモード */
:root[data-theme="light"] {
    --bg-gradient-1: #667eea;
    --bg-gradient-2: #764ba2;
    --bg-gradient-3: #f093fb;
    --menu-bg: rgba(255, 255, 255, 0.85);
    --menu-text: #333;
    --menu-hover: rgba(0, 0, 0, 0.1);
    --window-bg: rgba(255, 255, 255, 0.95);
    --window-header: linear-gradient(180deg, #f6f6f6 0%, #e8e8e8 100%);
    --window-border: rgba(0, 0, 0, 0.1);
    --window-title: #333;
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-muted: #86868b;
    --card-bg: #f5f5f7;
    --card-hover: #e8e8ed;
    --dock-bg: rgba(255, 255, 255, 0.3);
    --dock-border: rgba(255, 255, 255, 0.4);
    --dock-icon-bg: rgba(255, 255, 255, 0.9);
    --avatar-gradient-1: #667eea;
    --avatar-gradient-2: #764ba2;
}

/* 強制ダークモード */
:root[data-theme="dark"] {
    --bg-gradient-1: #1a1a2e;
    --bg-gradient-2: #16213e;
    --bg-gradient-3: #0f3460;
    --menu-bg: rgba(30, 30, 30, 0.85);
    --menu-text: #e0e0e0;
    --menu-hover: rgba(255, 255, 255, 0.1);
    --window-bg: rgba(40, 40, 40, 0.95);
    --window-header: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    --window-border: rgba(255, 255, 255, 0.1);
    --window-title: #e0e0e0;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #86868b;
    --card-bg: rgba(60, 60, 60, 0.6);
    --card-hover: rgba(80, 80, 80, 0.6);
    --dock-bg: rgba(50, 50, 50, 0.5);
    --dock-border: rgba(255, 255, 255, 0.1);
    --dock-icon-bg: rgba(60, 60, 60, 0.9);
    --avatar-gradient-1: #667eea;
    --avatar-gradient-2: #764ba2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景グラデーションアニメーション */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 背景コンテナ */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

/* オーロラ風の光 */
.aurora {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.aurora-1 {
    background: radial-gradient(ellipse at 20% 50%, rgba(120, 119, 198, 0.4) 0%, transparent 50%);
    animation: aurora1 8s ease-in-out infinite;
}

.aurora-2 {
    background: radial-gradient(ellipse at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
    animation: aurora2 10s ease-in-out infinite;
}

.aurora-3 {
    background: radial-gradient(ellipse at 40% 80%, rgba(98, 216, 243, 0.3) 0%, transparent 50%);
    animation: aurora3 12s ease-in-out infinite;
}

@keyframes aurora1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    33% { transform: translate(10%, 5%) scale(1.1); opacity: 0.7; }
    66% { transform: translate(-5%, -5%) scale(0.9); opacity: 0.4; }
}

@keyframes aurora2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    50% { transform: translate(-15%, 10%) scale(1.2); opacity: 0.6; }
}

@keyframes aurora3 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    25% { transform: translate(5%, -10%) scale(1.1); opacity: 0.5; }
    75% { transform: translate(-10%, 5%) scale(0.95); opacity: 0.4; }
}

/* 浮遊する光の球体 */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05));
    box-shadow: 
        0 0 60px rgba(255, 255, 255, 0.1),
        inset 0 0 60px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(2px);
    animation: float 20s infinite ease-in-out;
}

.bg-shape:nth-child(1) {
    width: 400px;
    height: 400px;
    left: -5%;
    top: 10%;
    animation-delay: 0s;
    animation-duration: 30s;
    background: radial-gradient(circle at 30% 30%, rgba(167, 139, 250, 0.2), transparent 70%);
}

.bg-shape:nth-child(2) {
    width: 300px;
    height: 300px;
    right: -5%;
    top: 5%;
    animation-delay: -5s;
    animation-duration: 25s;
    background: radial-gradient(circle at 30% 30%, rgba(251, 146, 180, 0.2), transparent 70%);
}

.bg-shape:nth-child(3) {
    width: 250px;
    height: 250px;
    left: 40%;
    bottom: 10%;
    animation-delay: -10s;
    animation-duration: 28s;
    background: radial-gradient(circle at 30% 30%, rgba(129, 230, 217, 0.2), transparent 70%);
}

.bg-shape:nth-child(4) {
    width: 350px;
    height: 350px;
    right: 20%;
    bottom: 20%;
    animation-delay: -7s;
    animation-duration: 32s;
    background: radial-gradient(circle at 30% 30%, rgba(196, 181, 253, 0.15), transparent 70%);
}

.bg-shape:nth-child(5) {
    width: 200px;
    height: 200px;
    left: 25%;
    top: 50%;
    animation-delay: -3s;
    animation-duration: 22s;
    background: radial-gradient(circle at 30% 30%, rgba(253, 186, 116, 0.15), transparent 70%);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(40px, -60px) rotate(45deg) scale(1.05);
    }
    50% {
        transform: translate(-30px, -100px) rotate(90deg) scale(1);
    }
    75% {
        transform: translate(60px, -40px) rotate(135deg) scale(0.95);
    }
}

/* 星のきらめき */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

.star:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.star:nth-child(2) { left: 25%; top: 35%; animation-delay: 0.5s; }
.star:nth-child(3) { left: 50%; top: 15%; animation-delay: 1s; }
.star:nth-child(4) { left: 70%; top: 40%; animation-delay: 1.5s; }
.star:nth-child(5) { left: 85%; top: 25%; animation-delay: 2s; }
.star:nth-child(6) { left: 15%; top: 60%; animation-delay: 0.3s; }
.star:nth-child(7) { left: 40%; top: 70%; animation-delay: 0.8s; }
.star:nth-child(8) { left: 60%; top: 55%; animation-delay: 1.3s; }
.star:nth-child(9) { left: 80%; top: 65%; animation-delay: 1.8s; }
.star:nth-child(10) { left: 95%; top: 45%; animation-delay: 2.3s; }
.star:nth-child(11) { left: 5%; top: 80%; animation-delay: 0.2s; }
.star:nth-child(12) { left: 30%; top: 85%; animation-delay: 0.7s; }
.star:nth-child(13) { left: 55%; top: 90%; animation-delay: 1.2s; }
.star:nth-child(14) { left: 75%; top: 80%; animation-delay: 1.7s; }
.star:nth-child(15) { left: 90%; top: 85%; animation-delay: 2.2s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* 流れ星 */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
    border-radius: 50%;
    animation: shoot 8s infinite;
    opacity: 0;
}

.shooting-star:nth-child(1) {
    top: 15%;
    left: 80%;
    animation-delay: 0s;
}

.shooting-star:nth-child(2) {
    top: 35%;
    left: 70%;
    animation-delay: 3s;
}

.shooting-star:nth-child(3) {
    top: 55%;
    left: 90%;
    animation-delay: 6s;
}

@keyframes shoot {
    0% {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    15% {
        transform: translateX(-300px) translateY(300px) rotate(-45deg);
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@media (prefers-color-scheme: dark) {
    .bg-shape {
        box-shadow: 
            0 0 80px rgba(255, 255, 255, 0.05),
            inset 0 0 80px rgba(255, 255, 255, 0.02);
    }
    
    .aurora-1 {
        background: radial-gradient(ellipse at 20% 50%, rgba(76, 29, 149, 0.4) 0%, transparent 50%);
    }
    
    .aurora-2 {
        background: radial-gradient(ellipse at 80% 20%, rgba(157, 23, 77, 0.3) 0%, transparent 50%);
    }
    
    .aurora-3 {
        background: radial-gradient(ellipse at 40% 80%, rgba(6, 78, 92, 0.3) 0%, transparent 50%);
    }
    
    .star {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
}

/* 強制ダークモード時の背景 */
:root[data-theme="dark"] .bg-shape {
    box-shadow: 
        0 0 80px rgba(255, 255, 255, 0.05),
        inset 0 0 80px rgba(255, 255, 255, 0.02);
}

:root[data-theme="dark"] .aurora-1 {
    background: radial-gradient(ellipse at 20% 50%, rgba(76, 29, 149, 0.4) 0%, transparent 50%);
}

:root[data-theme="dark"] .aurora-2 {
    background: radial-gradient(ellipse at 80% 20%, rgba(157, 23, 77, 0.3) 0%, transparent 50%);
}

:root[data-theme="dark"] .aurora-3 {
    background: radial-gradient(ellipse at 40% 80%, rgba(6, 78, 92, 0.3) 0%, transparent 50%);
}

:root[data-theme="dark"] .star {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* メニューバー */
.menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: var(--menu-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--menu-text);
    z-index: 1000;
    border-bottom: 1px solid var(--window-border);
}

.menu-left, .menu-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.apple-logo {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.apple-logo svg {
    fill: var(--menu-text);
}

.menu-item {
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.menu-item:hover {
    background: var(--menu-hover);
}

.menu-item.active {
    font-weight: 600;
}

.menu-icon {
    display: flex;
    align-items: center;
}

.menu-icon svg {
    stroke: var(--menu-text);
}

.menu-time {
    font-size: 12px;
    font-weight: 500;
}

/* デスクトップ */
.desktop {
    padding: 50px 30px 120px;
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
}

/* ウィンドウスタイル */
.window {
    background: var(--window-bg);
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.main-window {
    width: 100%;
    max-width: 700px;
    animation: windowOpen 0.4s ease-out;
}

.side-window {
    width: 280px;
    animation: windowOpen 0.4s ease-out 0.1s both;
}

@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ウィンドウドラッグ */
.window {
    transition: box-shadow 0.2s ease;
}

.window.dragging {
    cursor: grabbing;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.window-header {
    cursor: grab;
}

.window-header:active {
    cursor: grabbing;
}

/* 閉じるアニメーション */
.window.closing {
    animation: windowClose 0.3s ease-out forwards;
}

@keyframes windowClose {
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* ジーニーエフェクト（最小化） */
.window.minimizing {
    position: fixed !important;
    z-index: 9999 !important;
    pointer-events: none;
}

/* ジーニーエフェクト（復元） */
.window.restoring {
    position: fixed !important;
    z-index: 9999 !important;
    pointer-events: none;
}

/* 最大化 */
.window.maximized {
    border-radius: 0 !important;
    max-width: none !important;
    width: 100% !important;
    transition: all 0.3s ease;
}

.window.maximized .window-content {
    max-height: calc(100vh - 28px - 80px - 50px);
    overflow-y: auto;
}

.window-header {
    background: var(--window-header);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--window-border);
    position: relative;
    cursor: grab;
}

.window-header:active {
    cursor: grabbing;
}

.window-buttons {
    display: flex;
    gap: 8px;
    padding: 4px;
    margin: -4px;
}

.window-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
}

.window-btn:hover {
    filter: brightness(0.9);
    transform: scale(1.15);
}

.window-btn.close {
    background: #ff5f57;
    border: 1px solid #e0443e;
}

.window-btn.minimize {
    background: #febc2e;
    border: 1px solid #dea123;
}

.window-btn.maximize {
    background: #28c840;
    border: 1px solid #1aab29;
}

.window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 500;
    color: var(--window-title);
}

.window-content {
    padding: 30px;
}

/* プロフィールセクション */
.profile-section {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar svg {
    width: 50px;
    height: 50px;
    stroke: white;
}

.profile-name {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.profile-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
}

/* アバウトセクション */
.about-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.about-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.about-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 機能グリッド */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card:hover {
    background: var(--card-hover);
    transform: translateY(-4px);
}

.feature-icon {
    margin-bottom: 12px;
}

.feature-icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--text-primary);
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 12px;
    color: var(--text-muted);
}

/* リンクウィンドウ */
.links-content {
    padding: 16px !important;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.link-item:last-child {
    margin-bottom: 0;
}

.link-item:hover {
    background: var(--card-hover);
    transform: translateX(4px);
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
}

/* ドック */
.dock {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.dock-container {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    background: var(--dock-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid var(--dock-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.dock-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block;
}

.dock-item:hover {
    transform: translateY(-20px) scale(1.5) !important;
}

.dock-item.minimized-app {
    animation: dockBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dockBounce {
    0% { transform: translateY(50px) scale(0.3); opacity: 0; }
    50% { transform: translateY(-15px) scale(1.2); }
    70% { transform: translateY(5px) scale(0.95); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.dock-item::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.2s ease;
}

.dock-item:hover::before {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.dock-icon {
    width: 50px;
    height: 50px;
    background: var(--dock-icon-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease;
}

.dock-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--text-primary);
}

.dock-item:hover .dock-icon {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* ドックインジケーター（アプリが開いているかどうか） */
.dock-indicator {
    width: 4px;
    height: 4px;
    background: var(--text-primary);
    border-radius: 50%;
    margin: 4px auto 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dock-indicator.active {
    opacity: 1;
}

/* ウィンドウを開くアニメーション */
.window.opening {
    animation: windowOpen 0.3s ease-out;
}

/* 設定ウィンドウ */
.settings-window {
    width: 400px;
}

.settings-content {
    padding: 20px !important;
}

.settings-section h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 10px;
}

.settings-item:last-child {
    margin-bottom: 0;
}

.settings-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-item-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.settings-item-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* テーマボタン */
.settings-theme-buttons {
    display: flex;
    gap: 6px;
}

.theme-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: var(--card-hover);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    background: var(--text-muted);
    color: white;
}

.theme-btn.active {
    background: linear-gradient(135deg, var(--avatar-gradient-1), var(--avatar-gradient-2));
    color: white;
}

/* トグルスイッチ */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-hover);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--avatar-gradient-1), var(--avatar-gradient-2));
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* 背景アニメーション無効化 */
.bg-shapes.disabled {
    display: none;
}

body.no-gradient-animation {
    animation: none !important;
}

/* メモ帳ウィンドウ */
.notepad-window {
    width: 500px;
    min-height: 400px;
}

.notepad-content {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 350px;
}

.notepad-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--window-border);
}

.notepad-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--card-hover);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notepad-btn:hover {
    background: var(--text-muted);
    color: white;
}

.notepad-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.notepad-status {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.notepad-status.saved {
    color: #34c759;
}

.notepad-textarea {
    flex: 1;
    width: 100%;
    padding: 16px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
}

.notepad-textarea::placeholder {
    color: var(--text-muted);
}

/* 統計ウィンドウ */
.stats-window {
    width: 400px;
}

.stats-content {
    padding: 24px !important;
}

.stats-header {
    text-align: center;
    margin-bottom: 24px;
}

.stats-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stats-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--avatar-gradient-1), var(--avatar-gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-icon.heart {
    background: linear-gradient(135deg, #ff6b9d, #c449c2);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.stat-info {
    width: 100%;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.like-section {
    text-align: center;
}

.like-button {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff6b9d, #c449c2);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.like-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.like-button:active:not(:disabled) {
    transform: translateY(0);
}

.like-button svg {
    width: 24px;
    height: 24px;
    stroke: white;
    transition: all 0.3s ease;
}

.like-button.liked {
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.like-button.liked svg {
    fill: #ff6b9d;
    stroke: #ff6b9d;
}

.like-button.pulse {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.like-message {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.like-message.show {
    opacity: 1;
}

.dock-divider {
    width: 1px;
    height: 40px;
    background: var(--dock-border);
    margin: 0 4px;
    display: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .menu-bar {
        height: 35px;
        padding: 0 12px;
        font-size: 13px;
    }
    
    .apple-logo svg {
        width: 12px;
        height: 12px;
    }
    
    .desktop {
        padding: 40px 12px 100px;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .main-window, .side-window {
        width: 100%;
        max-width: 100%;
        min-height: 400px;
    }
    
    .window {
        border-radius: 12px;
    }
    
    .window-header {
        height: 35px;
        padding: 0 12px;
    }
    
    .window-controls {
        gap: 6px;
    }
    
    .window-btn {
        width: 16px;
        height: 16px;
    }
    
    .window-title {
        font-size: 13px;
    }
    
    .window-content {
        padding: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 16px;
    }

    .dock-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        border-radius: 12px;
    }

    .dock-container {
        gap: 8px;
        padding: 8px 12px;
        border-radius: 20px;
    }

    .menu-left {
        gap: 8px;
    }

    .menu-item:not(.active) {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* 統計ウィンドウ */
    .stats-window .window-content {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    /* 設定ウィンドウ */
    .settings-section {
        margin-bottom: 16px;
        padding: 12px;
    }
    
    .theme-buttons {
        gap: 8px;
    }
    
    .theme-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* メモ帳ウィンドウ */
    .notepad-textarea {
        height: 250px;
        font-size: 14px;
        line-height: 1.4;
    }
}

/* 小型スマホ対応 */
@media (max-width: 480px) {
    .menu-bar {
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
    
    .desktop {
        padding: 35px 8px 90px;
    }
    
    .main-window, .side-window {
        min-height: 350px;
    }
    
    .window-header {
        height: 32px;
        padding: 0 8px;
    }
    
    .window-btn {
        width: 14px;
        height: 14px;
    }
    
    .dock-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .dock-container {
        gap: 6px;
        padding: 6px 10px;
        border-radius: 18px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
}

/* タッチ操作の改善 */
@media (hover: none) and (pointer: coarse) {
    .dock-icon:hover {
        transform: translateY(0) scale(1);
    }
    
    .dock-icon:active {
        transform: translateY(-8px) scale(1.2);
        transition: transform 0.1s ease;
    }
    
    .window-btn:hover {
        transform: scale(1);
    }
    
    .window-btn:active {
        transform: scale(1.1);
        transition: transform 0.1s ease;
    }
    
    .feature-card:hover {
        transform: translateY(0);
        background: var(--card-bg);
    }
    
    .feature-card:active {
        transform: translateY(-2px);
        background: var(--card-hover);
        transition: all 0.1s ease;
    }
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
