* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --secondary: #ff3366;
    --bg-dark: #0a0a0f;
    --bg-medium: #12121a;
    --bg-light: #1a1a25;
    --text: #e0e0e0;
    --text-dim: #808090;
    --border: #2a2a35;
    --window-bg: rgba(18, 18, 26, 0.95);
    --shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-dark);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    user-select: none;
}

#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: boot-fade-in 0.5s ease-out;
}

@keyframes boot-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.boot-content {
    text-align: center;
    margin-bottom: 40px;
}

.boot-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary);
    animation: logo-pulse 2s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { text-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary); }
    50% { text-shadow: 0 0 30px var(--primary), 0 0 60px var(--primary), 0 0 80px var(--primary); }
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 5px;
    letter-spacing: 3px;
}

.boot-loader {
    width: 300px;
    margin: 0 auto;
}

.boot-bar {
    height: 4px;
    background: var(--bg-medium);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.boot-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    border-radius: 2px;
    transition: width 0.1s ease-out;
}

.boot-status {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.boot-scrollable {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    font-size: 0.7rem;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
}

#boot-log {
    position: fixed;
    top: 2px;
    left: 2px;
    background: transparent;
    opacity: 0.7;
}

#desktop {
    display: none;
    height: 100vh;
    position: relative;
    flex-direction: column;
}

.desktop-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 51, 102, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
    z-index: -1;
}

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--bg-medium);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 100;
}

.start-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.start-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.start-icon {
    font-size: 1.2rem;
}

.taskbar-apps {
    display: flex;
    gap: 5px;
    margin-left: 20px;
}

.taskbar-app {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.taskbar-app:hover {
    background: var(--bg-light);
    border-color: var(--border);
}

.taskbar-app.active {
    background: var(--bg-light);
    border-color: var(--primary);
}

.clock {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 700;
}

.start-menu {
    position: fixed;
    bottom: 58px;
    left: 10px;
    width: 250px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    display: none;
    flex-direction: column;
    z-index: 99;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.start-menu.open {
    display: flex;
    animation: menu-slide-up 0.2s ease-out;
}

@keyframes menu-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.start-menu-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--primary);
}

.menu-version {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.start-menu-apps {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-app {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    text-align: left;
}

.menu-app:hover {
    background: var(--bg-light);
}

.app-icon {
    font-size: 1.2rem;
}

.start-menu-footer {
    padding: 10px 15px;
    border-top: 1px solid var(--border);
    font-size: 0.7rem;
    color: var(--text-dim);
}

.desktop-icons {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 80px;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.05);
}

.desktop-icon .icon {
    font-size: 2rem;
}

.desktop-icon .icon-label {
    font-size: 0.75rem;
    color: var(--text);
    text-align: center;
}

.windows-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 58px);
    pointer-events: none;
}

.window {
    position: absolute;
    background: var(--window-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), var(--shadow);
    pointer-events: auto;
    display: none;
    flex-direction: column;
    min-width: 400px;
    min-height: 300px;
    overflow: hidden;
}

.window.active {
    display: flex;
    animation: window-open 0.2s ease-out;
}

.window.maximized {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 48px);
    border-radius: 0;
    z-index: 200;
}

@keyframes window-open {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.window-header {
    padding: 10px 15px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

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

.window-title {
    font-size: 0.85rem;
    color: var(--text);
}

.window-maximize,
.window-close {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.window-maximize:hover,
.window-close:hover {
    background: var(--bg-medium);
    color: var(--text);
}

.window-close:hover {
    background: var(--secondary);
    color: white;
}

.window-content {
    flex: 1;
    overflow: auto;
    padding: 15px;
}

.terminal-content {
    background: #0d0d12;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.terminal-output {
    height: calc(100% - 40px);
    overflow-y: auto;
    padding-bottom: 10px;
}

.ascii-art {
    color: var(--primary);
    font-size: 0.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
    white-space: pre;
}

.terminal-line {
    margin-bottom: 5px;
}

.terminal-prompt {
    color: var(--primary);
    margin-right: 8px;
}

.terminal-welcome {
    color: var(--secondary);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    outline: none;
}

.about-content {
    text-align: center;
    padding: 30px;
}

.about-logo {
    margin-bottom: 20px;
}

.about-logo .glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary);
    position: relative;
}

.about-info h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 10px;
}

.about-info p {
    color: var(--text-dim);
    margin-bottom: 20px;
}

.about-details {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span:first-child {
    color: var(--text-dim);
}

.status-online {
    color: var(--primary);
}

.about-message {
    padding: 15px;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--secondary);
    border-radius: 8px;
}

.about-message p {
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.about-message p:last-child {
    margin-bottom: 0;
}

.roleta-content {
    padding: 0;
    background: var(--bg-dark);
}

.roleta-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100%;
    min-height: 460px;
}

.window.maximized .roleta-layout {
    grid-template-columns: 400px 1fr;
}

.window.maximized .roleta-wheel-container {
    width: 400px;
    height: 400px;
}

.window.maximized .roleta-canvas {
    width: 100%;
    height: 100%;
}

.roleta-editor {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-right: 1px solid var(--border);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.editor-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.empty-list {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.roleta-option {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-light);
    border-radius: 6px;
}

.roleta-option input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.85rem;
}

.roleta-option input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.roleta-option input[type="number"] {
    width: 80px;
    padding: 8px 10px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.85rem;
    text-align: right;
}

.roleta-option input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

.roleta-option .btn-remove {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.roleta-option .btn-remove:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.roleta-option .percent-suffix {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.editor-footer {
    margin-bottom: 12px;
}

.chance-indicator {
    padding: 10px;
    background: var(--bg-medium);
    border-radius: 6px;
    text-align: center;
}

.chance-indicator .total-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.chance-indicator .total-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 6px;
}

.chance-indicator .total-status {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.chance-indicator.complete .total-value {
    color: var(--primary);
}

.chance-indicator.complete .total-status {
    color: var(--primary);
}

.chance-indicator.incomplete .total-value {
    color: #ffaa00;
}

.chance-indicator.incomplete .total-status {
    color: #ffaa00;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    color: var(--bg-dark);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    opacity: 0.9;
}

.btn-action {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--bg-light);
}

.btn-action.btn-outline {
    border-style: dashed;
}

.btn-action.btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.roleta-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 15px;
}

.roleta-wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.roleta-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow:
        0 0 0 4px var(--border),
        0 0 20px rgba(0, 0, 0, 0.3);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.roleta-wheel.spinning {
    transform: rotate(1440deg);
}

#roleta-canvas {
    width: 100%;
    height: 100%;
}

.roleta-wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.roleta-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--secondary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.btn-spin {
    width: 180px;
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark);
    border: none;
    border-radius: 8px;
    color: var(--bg-dark);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-spin:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.btn-spin:disabled {
    background: var(--bg-light);
    color: var(--text-dim);
    cursor: not-allowed;
    box-shadow: none;
}

.roleta-result {
    min-height: 40px;
    padding: 10px 20px;
    background: var(--bg-medium);
    border: 2px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.roleta-result.winner {
    border-color: var(--primary);
    color: var(--primary);
    animation: result-pulse 0.5s ease-out;
}

@keyframes result-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.roleta-audio-hidden {
    display: none;
}

.timer-content {
    padding: 0;
    background: var(--bg-dark);
}

.timer-app {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    min-height: 400px;
}

.timer-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px;
    border-right: 1px solid var(--border);
}

.timer-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-input-group label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.time-input-group input {
    padding: 12px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
}

.time-input-group input:focus {
    border-color: var(--primary);
    outline: none;
}

.time-input-group button {
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-input-group button:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.time-boosts {
    display: flex;
    gap: 8px;
}

.time-boosts button {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-boosts button:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

.timer-buttons {
    display: flex;
    gap: 8px;
}

.timer-buttons button {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-buttons button:hover {
    background: var(--bg-light);
}

.timer-buttons .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: var(--bg-dark);
    font-weight: 700;
}

.timer-buttons .btn-primary:hover {
    background: var(--primary);
}

.timer-status {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.timer-shell {
    width: 100%;
    padding: 25px;
    background: #1a1a22;
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
}

.timer-label {
    display: block;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    margin-bottom: 10px;
}

.timer-screen {
    padding: 20px 30px;
    background: linear-gradient(180deg, var(--primary) 0%, #00aa55 100%);
    border-radius: 12px;
    color: #032d14;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 15px;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        0 10px 30px rgba(0, 255, 136, 0.3);
}

.timer-screen.finished {
    animation: timer-pulse 1s ease-in-out infinite;
}

.timer-screen .divider {
    opacity: 0.7;
}

.selected-time {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.selected-time strong {
    color: var(--primary);
}

@keyframes timer-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.3),
            0 10px 30px rgba(0, 255, 136, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.3),
            0 15px 40px rgba(0, 255, 136, 0.5);
    }
}

@media (max-width: 600px) {
    .logo-text {
        font-size: 2rem;
    }

    .start-btn .start-text {
        display: none;
    }

    .desktop-icon {
        width: 60px;
    }

    .desktop-icon .icon {
        font-size: 1.5rem;
    }

    .desktop-icon .icon-label {
        font-size: 0.65rem;
    }

    .window {
        min-width: 280px;
    }

    .ascii-art {
        font-size: 0.35rem;
    }
}