/* =========================================
   1. ベース設定・背景素材
   ========================================= */
html, body { 
  margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; 
  font-family: "Meiryo", "Segoe UI", sans-serif; user-select: none; -webkit-user-select: none; 
}
.bg-element { position: absolute; pointer-events: none; }

/* 虹 */
.rainbow { top: 0; left: 50%; transform: translateX(-50%); width: 100vw; max-width: 1000px; height: auto; opacity: 0.6; z-index: -5; filter: blur(5px); }

/* 雲 */
.clouds { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -4; overflow: hidden; }
.cloud { opacity: 0.8; filter: drop-shadow(0 5px 15px rgba(255,255,255,0.4)); object-fit: contain; }
.cloud-1 { top: 10%; left: -20%; width: 40vw; max-width: 400px; animation: floatCloud 60s linear infinite; } 
.cloud-2 { top: 30%; right: -20%; width: 30vw; max-width: 300px; animation: floatCloud 45s linear infinite reverse; }
@keyframes floatCloud { from { transform: translateX(0); } to { transform: translateX(120vw); } }

/* イルカ */
.dolphin { bottom: 15%; left: 10%; width: 30vw; max-width: 250px; height: auto; object-fit: contain; z-index: -3; filter: drop-shadow(5px 10px 20px rgba(0,0,0,0.3)); animation: jumpDolphin 10s ease-in-out infinite; }
@keyframes jumpDolphin { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-50px) rotate(-5deg); } 

/* 蝶々（Frutiger Aero 背景演出） */
.butterfly{
  top: 8%;
  right: 2%;
  width: 75vw;
  max-width: 900px;
  height: auto;
  opacity: 0.85;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.22));
  mix-blend-mode: screen;
  animation: floatButterfly 14s ease-in-out infinite;
  transform-origin: 60% 40%;
}
@keyframes floatButterfly{
  0%,100%{ transform: translate(0,0) rotate(1deg) scale(1); }
  50%{ transform: translate(-40px,20px) rotate(-2deg) scale(1.02); }
}
@media (max-width:600px){
  .butterfly{ top: 10%; right: -10%; width: 110vw; opacity: 0.75; }
}
}

/* Aero背景（グラデーション） */
.aero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at 80% -20%, rgba(178, 241, 255, 0.7) 0%, rgba(41, 128, 185, 0.7) 50%, rgba(8, 59, 102, 0.8) 100%); z-index: 1; }
.aero-bg::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 40%; background: linear-gradient(to top, rgba(123, 237, 159, 0.3) 0%, transparent 100%); }

/* シャボン玉アニメーション */
.bubbles-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; bottom: -50px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0.1) 60%, rgba(255,255,255,0.4)); border: 1px solid rgba(255,255,255,0.6); border-radius: 50%; box-shadow: inset 0 0 10px rgba(255,255,255,0.5), 0 0 10px rgba(255,255,255,0.2); animation: rise linear infinite; }
.bubble:nth-child(1) { width: 40px; height: 40px; left: 10%; animation-duration: 8s; animation-delay: 0s; } 
.bubble:nth-child(2) { width: 20px; height: 20px; left: 25%; animation-duration: 5s; animation-delay: 2s; } 
.bubble:nth-child(3) { width: 50px; height: 50px; left: 50%; animation-duration: 10s; animation-delay: 1s; }
@keyframes rise { 0% { transform: translateY(0) scale(1); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-110vh) scale(1.2); opacity: 0; } }

/* =========================================
   2. デスクトップの散らかり要素
   ========================================= */
.desktop-icons { position: absolute; top: 20px; left: 20px; z-index: 5; display: flex; gap: 20px; }
.icon-column { display: flex; flex-direction: column; gap: 20px; }
.icon { display: flex; flex-direction: column; align-items: center; width: 85px; cursor: pointer; pointer-events: auto; }

/* アイコン画像・エフェクト */
.desktop-img { width: 65px; height: 65px; margin-bottom: 3px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); transition: transform 0.1s; }
.glossy-orb { width: 65px; height: 65px; border-radius: 50%; margin-bottom: 3px; background-image: url('../img/bubbles.png'); background-size: cover; background-position: center; box-shadow: 0 3px 5px rgba(0,0,0,0.3), inset 0 -2px 3px rgba(0,0,0,0.4), inset 0 2px 3px rgba(255,255,255,0.5); transition: transform 0.1s; }
.folder-orb { filter: contrast(1.2) brightness(1.1) hue-rotate(60deg); } 
.disk-orb { filter: contrast(1.2) brightness(1.1) hue-rotate(180deg); }
.glossy-icon { font-size: 48px; line-height: 1; margin-bottom: 3px; filter: drop-shadow(2px 3px 3px rgba(0,0,0,0.4)); }
.file-icon { color: #eee; } .shortcut-icon { color: #55e6ff; } .zip-icon { color: #f1c40f; } .trash-icon { color: #aaa; }

.icon:hover .desktop-img, .icon:hover .glossy-orb, .icon:hover .glossy-icon { transform: scale(1.05); }
.icon span { color: white; font-size: 12px; text-align: center; text-shadow: 1px 1px 2px #000; padding: 2px 4px; border-radius: 2px; border: 1px solid transparent; word-break: break-all; line-height: 1.2; font-weight: bold; }
.icon:hover span { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); backdrop-filter: blur(2px); }

/* 付箋と散らばった画像 */
.sticky-note { position: absolute; width: 120px; height: 120px; background: #fff7a1; box-shadow: 3px 3px 10px rgba(0,0,0,0.3); padding: 10px; font-family: 'Comic Sans MS', cursive, sans-serif; font-size: 12px; color: #333; border-bottom-right-radius: 20px 5px; z-index: 4; }
.desktop-loose-img { position: absolute; z-index: 4; filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.4)); opacity: 0.8; }

/* =========================================
   3. サイドバーガジェット
   ========================================= */
.sidebar-gadgets { position: absolute; top: 20px; right: 20px; z-index: 5; display: flex; flex-direction: column; gap: 15px; }
.gadget { width: 110px; height: 110px; border-radius: 10px; background: rgba(0,0,0,0.3); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 2px solid rgba(255,255,255,0.3); box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.5); position: relative; overflow: hidden; }

/* 時計 */
.clock-gadget { border-radius: 50%; box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.8); } 
.clock-gadget::after { content: ''; position: absolute; top: 2%; left: 10%; width: 80%; height: 40%; background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent); border-radius: 50%; pointer-events: none; } 
.clock-face { position: relative; width: 100%; height: 100%; } 
.hand { position: absolute; bottom: 50%; left: 50%; transform-origin: bottom center; transform: translateX(-50%); border-radius: 10px; box-shadow: 1px 1px 3px rgba(0,0,0,0.5); } 
.hour { width: 6px; height: 30%; background: #fff; } .minute { width: 4px; height: 40%; background: #ccc; } .second { width: 2px; height: 45%; background: #e74c3c; } 
.center-dot { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; background: #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 3px rgba(0,0,0,0.5); }

/* CPUメーター */
.cpu-gadget { background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; } 
.gauge-dial { width: 90%; height: 50%; border-top-left-radius: 90px; border-top-right-radius: 90px; background: linear-gradient(to right, #0f0, #ff0, #f00); position: relative; bottom: -20px; border: 2px solid rgba(255,255,255,0.5); box-shadow: inset 0 5px 10px rgba(0,0,0,0.5); display: flex; justify-content: center; color: #fff; font-weight: bold; text-shadow: 1px 1px 2px #000; } 
.gauge-needle { position: absolute; bottom: 0; left: 50%; width: 4px; height: 90%; background: #fff; transform-origin: bottom center; transform: translateX(-50%) rotate(-45deg); border-radius: 2px; box-shadow: 1px 1px 3px rgba(0,0,0,0.5); transition: transform 0.5s cubic-bezier(0.1, 1.5, 0.6, 1); }

/* =========================================
   4. Aero Glass ウィンドウ (超リアル)
   ========================================= */
.aero-window { 
  position: absolute; background: rgba(230, 245, 255, 0.25); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); 
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 8px; 
  box-shadow: 0 15px 40px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.9), inset 0 0 15px rgba(255,255,255,0.3); 
  display: flex; flex-direction: column; padding: 6px; box-sizing: border-box; z-index: 10; 
}
.glass-highlight { position: absolute; top: 0; left: 0; right: 0; height: 30px; background: linear-gradient(to bottom, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.1) 100%); border-radius: 7px 7px 0 0; pointer-events: none; z-index: 0; }
.panel-bg { background-image: url('../img/panel.png'); background-size: cover; background-position: center; border: none; }

/* タイトルバー＆ボタン */
.title-bar { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; cursor: grab; position: relative; z-index: 1; background: transparent; border: none; margin-bottom: 5px; } 
.title-bar:active { cursor: grabbing; } 
.title-text { color: #111; font-size: 13px; text-shadow: 0 0 8px rgba(255,255,255,1), 0 1px 1px rgba(255,255,255,0.8); font-weight: bold; display: flex; align-items: center; gap: 5px;}
.window-controls { display: flex; gap: 2px; } 
.ctrl-btn { width: 28px; height: 18px; border: 1px solid rgba(0,0,0,0.4); border-radius: 3px 3px 0 0; cursor: pointer; font-size: 9px; font-weight: bold; background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(180,180,180,0.9)); box-shadow: inset 0 1px rgba(255,255,255,1), 0 1px 2px rgba(0,0,0,0.2); transition: 0.1s; } 
.ctrl-btn:hover { background: linear-gradient(to bottom, #e0f0ff, #a0d0ff); border-color: #0078d7; } 
.close-btn { background: linear-gradient(to bottom, #ff8888, #cc0000); color: white; border-color: #500; text-shadow: 0 1px 1px #000; } 
.close-btn:hover { background: linear-gradient(to bottom, #ffaaaa, #ff2222); box-shadow: inset 0 1px rgba(255,255,255,0.5), 0 0 5px red; }

/* ウィンドウ内側 */
.window-content { flex: 1; border-radius: 3px; border: 1px solid rgba(0,0,0,0.4); box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); position: relative; z-index: 1; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.semi-transparent { background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.6); }

/* アプリ専用スタイル：メモ帳 */
.notepad-menu { background: #f0f0f0; color: #000; font-size: 11px; padding: 2px 10px; border-bottom: 1px solid #ccc; white-space: pre; position: relative; z-index: 1; }
.notepad-textarea { width: 100%; height: 100%; border: none; resize: none; padding: 10px; font-family: "MS Gothic", monospace; font-size: 14px; outline: none; box-sizing: border-box; }

/* アプリ専用スタイル：ウェルカムセンター */
.content-header { padding: 15px; background: linear-gradient(to right, rgba(0, 120, 215, 0.8), rgba(0, 180, 216, 0.8)); color: white; border-bottom: 1px solid rgba(255,255,255,0.5); } 
.content-header h2 { margin: 0 0 5px 0; font-size: 16px; font-weight: normal; text-shadow: 0 1px 2px rgba(0,0,0,0.5); } 
.content-header p { margin: 0; font-size: 12px; opacity: 0.9; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.content-body { padding: 15px; display: flex; flex-direction: column; gap: 15px; } 
.feature-box { background: rgba(255,255,255,0.7); padding: 10px; border: 1px solid rgba(255,255,255,0.8); border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); } 
.feature-box h3 { margin: 0 0 5px 0; font-size: 14px; color: #111; } 
.feature-box p { margin: 0; font-size: 12px; color: #444; }

/* アプリ専用スタイル：ブラウザ */
.browser-toolbar { background: linear-gradient(to bottom, #f0f0f0, #e0e0e0); padding: 5px; display: flex; gap: 5px; border-bottom: 1px solid #ccc; align-items: center; } 
.nav-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #aaa; background: linear-gradient(to bottom, #fff, #ddd); color: #0078d7; font-size: 14px; cursor: pointer; } 
.nav-btn:hover { background: #eef8ff; border-color: #0078d7; } 
.url-bar { flex: 1; padding: 4px 10px; border: 1px solid #aaa; border-radius: 3px; font-family: inherit; color: #333; outline: none; }

/* アプリ専用スタイル：Media Player */
.player-btn { background: linear-gradient(to bottom, #555, #222); border: 1px solid #111; color: white; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,0.2), 0 2px 5px rgba(0,0,0,0.5); transition: 0.1s; display: flex; justify-content: center; align-items: center;} 
.player-btn:hover { filter: brightness(1.3); color: #55e6ff; box-shadow: 0 0 10px #55e6ff; }
.visualizer-bar { position: absolute; bottom: 0; width: 10px; background: linear-gradient(to top, #0078d7, #55e6ff); animation: bounce 1s infinite alternate ease-in-out; } 
@keyframes bounce { 0% { height: 10px; } 100% { height: 100px; } }

/* =========================================
   5. タスクバーと通知バルーン
   ========================================= */
.taskbar { position: fixed; bottom: 0; left: 0; width: 100%; height: 40px; display: flex; align-items: center; z-index: 1000; padding: 0 10px; box-sizing: border-box; }
.taskbar-glass { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(15px) saturate(150%); -webkit-backdrop-filter: blur(15px) saturate(150%); border-top: 1px solid rgba(255,255,255,0.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 -2px 10px rgba(0,0,0,0.5); z-index: -1; }

.start-orb-image { width: 48px; height: 48px; background-image: url('../img/logo.png'); background-size: 80%; background-position: center; background-repeat: no-repeat; margin-top: -12px; background-color: rgba(255,255,255,0.1); border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 2px 5px rgba(0,0,0,0.6), inset 0 4px 5px rgba(255,255,255,0.4), inset 0 -4px 5px rgba(0,0,0,0.4); cursor: pointer; position: relative; z-index: 1001; transition: 0.2s; } 
.start-orb-image:hover { filter: drop-shadow(0 0 10px rgba(85, 230, 255, 0.8)) brightness(1.2); background-color: rgba(255,255,255,0.3); } 
.start-orb-image:active { transform: scale(0.95); }

.taskbar-items { flex: 1; display: flex; margin-left: 15px; gap: 5px; }
.task-item { background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.1)); border: 1px solid rgba(255,255,255,0.5); padding: 0 15px; height: 28px; border-radius: 3px; color: white; font-size: 12px; display: flex; align-items: center; box-shadow: inset 0 1px rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.2); cursor: pointer; text-shadow: 0 1px 2px #000; transition: 0.2s; } 
.task-item:hover { background: linear-gradient(to bottom, rgba(255,255,255,0.5), rgba(255,255,255,0.2)); box-shadow: 0 0 10px rgba(255,255,255,0.3); } 
.task-item.active { background: linear-gradient(to bottom, rgba(200, 240, 255, 0.5), rgba(150, 220, 255, 0.3)); border-color: rgba(100, 200, 255, 0.8); box-shadow: inset 0 0 15px rgba(100, 230, 255, 0.5); }

.tray { display: flex; align-items: center; gap: 10px; color: white; font-size: 12px; text-shadow: 0 1px 2px #000; position: relative; }

/* 通知バルーン */
.tray-balloon { position: absolute; bottom: 50px; right: 10px; width: 250px; background: #ffffe1; border: 1px solid #000; border-radius: 5px; padding: 10px; box-shadow: 3px 3px 10px rgba(0,0,0,0.5); font-size: 11px; color: #000; z-index: 1002; animation: popUp 0.5s ease-out; } 
.tray-balloon::after { content: ''; position: absolute; bottom: -10px; right: 20px; border-width: 10px 10px 0 0; border-style: solid; border-color: #ffffe1 transparent transparent transparent; } 
.tray-balloon::before { content: ''; position: absolute; bottom: -11px; right: 19px; border-width: 11px 11px 0 0; border-style: solid; border-color: #000 transparent transparent transparent; z-index: -1; } 
.balloon-title { font-weight: bold; margin-bottom: 5px; display: flex; align-items: center; } 
.balloon-close { position: absolute; top: 5px; right: 5px; width: 16px; height: 16px; background: #e74c3c; color: white; text-align: center; line-height: 16px; border-radius: 3px; cursor: pointer; font-weight: bold; } 
@keyframes popUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* =========================================
   6. スタートメニュー
   ========================================= */
.start-menu { position: fixed; bottom: 40px; left: 0; width: 400px; height: 500px; background: rgba(230, 245, 255, 0.3); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border: 1px solid rgba(255,255,255,0.5); border-radius: 0 8px 8px 0; box-shadow: 5px -5px 20px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.8); display: flex; flex-direction: column; z-index: 999; transform: translateY(100%); opacity: 0; pointer-events: none; transition: 0.3s cubic-bezier(0.1, 0.9, 0.2, 1); } 
.start-menu.active { transform: translateY(0); opacity: 1; pointer-events: auto; }

.user-profile-top { position: absolute; top: -25px; right: 20px; z-index: 10; } 
.user-icon-frame { width: 60px; height: 60px; background: linear-gradient(to bottom, #ddd, #fff); border-radius: 5px; padding: 3px; box-shadow: 0 5px 10px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,1); border: 1px solid #aaa; } 
.user-icon-inner { width: 100%; height: 100%; background: #fff; border: 1px solid #888; display: flex; align-items: center; justify-content: center; font-size: 30px; }

.start-menu-inner { flex: 1; display: flex; margin: 5px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(0,0,0,0.3); box-shadow: inset 0 1px rgba(255,255,255,0.3); }

/* 左ペイン */
.start-menu-left { flex: 6; background: #fff; padding: 10px 10px 45px 10px; display: flex; flex-direction: column; gap: 2px; position: relative; } 
.menu-item { display: flex; align-items: center; padding: 6px 10px; font-size: 13px; color: #333; border-radius: 4px; cursor: pointer; border: 1px solid transparent; transition: 0.1s; } 
.menu-item:hover { background: linear-gradient(to bottom, rgba(230,245,255,1), rgba(200,230,255,1)); border-color: #88cfff; box-shadow: inset 0 1px rgba(255,255,255,0.8); } 
.menu-img-icon { width: 24px; height: 24px; margin-right: 10px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2)); }
.menu-text { flex: 1; font-weight: bold; } 
.menu-separator { height: 1px; background: linear-gradient(to right, transparent, #ddd, transparent); margin: 5px 0; }
.start-search-box { position: absolute; bottom: 5px; left: 5px; right: 5px; height: 30px; background: #fff; border: 1px solid #a0a0a0; border-radius: 15px; display: flex; align-items: center; padding: 0 10px; box-shadow: inset 0 2px 5px rgba(0,0,0,0.1); } 
.start-search-box input { border: none; outline: none; flex: 1; font-style: italic; color: #888; font-family: inherit; } 
.search-icon { font-size: 12px; color: #0078d7; }

/* 右ペイン */
.start-menu-right { flex: 4; background: rgba(0, 15, 40, 0.6); padding: 40px 10px 10px 10px; display: flex; flex-direction: column; gap: 5px; box-shadow: inset 1px 0 rgba(255,255,255,0.1); position: relative; } 
.menu-item-right { padding: 6px 10px; font-size: 13px; color: white; text-shadow: 0 1px 2px #000; cursor: pointer; border-radius: 4px; transition: 0.1s; border: 1px solid transparent; } 
.menu-item-right:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.3); box-shadow: inset 0 1px rgba(255,255,255,0.2); } 
.menu-separator-right { height: 1px; background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent); margin: 5px 0; }

.power-section { position: absolute; bottom: 10px; right: 10px; display: flex; gap: 5px; } 
.power-btn { width: 30px; height: 25px; background: linear-gradient(to bottom, #eee, #aaa); border: 1px solid #555; border-radius: 3px; cursor: pointer; font-size: 12px; box-shadow: inset 0 1px #fff, 0 1px 3px rgba(0,0,0,0.5); } 
.power-btn:hover { background: #fff; }

/* =========================================
   7. スマホ対応 (メディアクエリ)
   ========================================= */
@media (max-width: 600px) { 
  .start-menu { width: 100%; border-radius: 8px 8px 0 0; } 
  .sidebar-gadgets { display: none; } 
  .desktop-icons { flex-direction: column; } 
}
