/* Windows 95風基本スタイル */

/* カラーパレット */
:root {
    --desktop-bg: #008080;
    --window-bg: #C0C0C0;
    --title-bar: #000080;
    --shadow: #808080;
    --accent: #FF66CC;
    --link: #00E0B8;
    --button-face: #C0C0C0;
    --button-shadow: #808080;
    --button-hilight: #FFFFFF;
    --button-dark: #404040;
    --text-primary: #000000;
    --text-inverse: #FFFFFF;
}

/* 基本フォント設定 */
body {
    font-family: 'MS UI Gothic', 'Courier New', monospace;
    font-size: 13px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--desktop-bg);
    cursor: default;
    user-select: none;
}

/* 3Dボタンスタイル */
.btn-3d {
    background: var(--button-face);
    border: 2px outset var(--button-face);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    box-sizing: border-box;
}

.btn-3d:hover {
    background: #D4D0C8;
}

.btn-3d:active {
    border: 2px inset var(--button-face);
}

.btn-3d:disabled {
    color: var(--button-shadow);
    cursor: not-allowed;
}

/* ウィンドウスタイル */
.window {
    position: absolute;
    background: var(--window-bg);
    border: 2px outset var(--window-bg);
    box-shadow: 3px 3px 0 var(--shadow);
    min-width: 300px;
    min-height: 200px;
    z-index: 10;
}

.window.active {
    z-index: 100;
}

.window.maximized {
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 40px !important;
    width: auto !important;
    height: auto !important;
}

.window-header {
    background: var(--title-bar);
    color: var(--text-inverse);
    padding: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    font-weight: bold;
    font-size: 14px;
}

.window-header.inactive {
    background: var(--button-shadow);
}

.window-title {
    padding: 4px 8px;
    flex-grow: 1;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-controls button {
    width: 18px;
    height: 18px;
    background: var(--button-face);
    border: 1px outset var(--button-face);
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.window-controls button:hover {
    background: #D4D0C8;
}

.window-controls button:active {
    border: 1px inset var(--button-face);
}

.close-btn:hover {
    background: #FF6B6B;
    color: white;
}

.window-content {
    padding: 16px;
    height: calc(100% - 32px);
    overflow-y: auto;
    background: var(--window-bg);
}

/* タスクバー */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--button-face);
    border-top: 2px outset var(--button-face);
    display: flex;
    align-items: center;
    padding: 2px;
    z-index: 1000;
}

.start-button {
    background: var(--button-face);
    border: 2px outset var(--button-face);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    box-sizing: border-box;
}

.start-button:hover {
    background: #D4D0C8;
}

.start-button:active,
.start-button.active {
    border: 2px inset var(--button-face);
}

.start-logo {
    font-size: 16px;
}

.taskbar-windows {
    flex-grow: 1;
    padding: 0 8px;
    display: flex;
    gap: 4px;
}

.taskbar-item {
    background: var(--button-face);
    border: 2px outset var(--button-face);
    color: var(--text-primary);
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    max-width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.taskbar-item.active {
    border: 2px inset var(--button-face);
}

.taskbar-clock {
    color: var(--text-primary);
    font-size: 12px;
    padding: 0 8px;
    border: 1px inset var(--button-face);
    background: var(--button-face);
    height: 24px;
    display: flex;
    align-items: center;
}

/* Startメニュー */
.start-menu {
    position: fixed;
    bottom: 42px;
    left: 2px;
    width: 200px;
    background: var(--button-face);
    border: 2px outset var(--button-face);
    box-shadow: 3px 3px 0 var(--shadow);
    z-index: 1001;
}

.start-menu-header {
    background: var(--title-bar);
    color: var(--text-inverse);
    padding: 8px;
    font-weight: bold;
    font-size: 12px;
}

.start-menu-content {
    padding: 4px 0;
}

.menu-item,
.menu-cta-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background: var(--title-bar);
    color: var(--text-inverse);
}

.menu-cta-item {
    font-weight: bold;
    color: var(--accent);
}

.menu-cta-item:hover {
    background: var(--accent);
    color: var(--text-inverse);
}

.menu-separator {
    height: 1px;
    background: var(--button-shadow);
    margin: 4px 8px;
}

/* デスクトップアイコン */
.desktop-icons {
    position: absolute;
    top: 16px;
    left: 16px;
}

.desktop-icon {
    width: 80px;
    margin-bottom: 16px;
    cursor: pointer;
    text-align: center;
}

.desktop-icon:hover .icon-label {
    background: var(--title-bar);
    color: var(--text-inverse);
}

.icon-image {
    font-size: 32px;
    margin-bottom: 4px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

.icon-label {
    font-size: 11px;
    color: var(--text-inverse);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
    padding: 2px 4px;
    border-radius: 2px;
    word-break: break-word;
}

/* ダイアログ */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.dialog {
    background: var(--window-bg);
    border: 2px outset var(--window-bg);
    box-shadow: 3px 3px 0 var(--shadow);
    min-width: 300px;
    max-width: 90vw;
}

.dialog-header {
    background: var(--title-bar);
    color: var(--text-inverse);
    padding: 8px;
    font-weight: bold;
    font-size: 14px;
}

.dialog-content {
    padding: 16px;
    text-align: center;
}

.dialog-content p {
    margin: 8px 0;
}

.dialog-buttons {
    padding: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dialog-btn {
    background: var(--button-face);
    border: 2px outset var(--button-face);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 6px 16px;
    cursor: pointer;
    min-width: 80px;
}

.dialog-btn:hover {
    background: #D4D0C8;
}

.dialog-btn:active {
    border: 2px inset var(--button-face);
}

.dialog-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-inverse);
    font-weight: bold;
}

.dialog-btn.primary:hover {
    background: #FF99DD;
}

/* ユーティリティクラス */
.hidden {
    display: none !important;
}

.active {
    /* アクティブ状態のスタイル */
}

/* スクロールバー（Windows95風） */
::-webkit-scrollbar {
    width: 16px;
}

::-webkit-scrollbar-track {
    background: var(--window-bg);
    border: 1px inset var(--button-face);
}

::-webkit-scrollbar-thumb {
    background: var(--button-face);
    border: 2px outset var(--button-face);
}

::-webkit-scrollbar-thumb:hover {
    background: #D4D0C8;
}

::-webkit-scrollbar-button {
    background: var(--button-face);
    border: 1px outset var(--button-face);
    height: 16px;
}

::-webkit-scrollbar-button:hover {
    background: #D4D0C8;
}