:root {
    /* Candy Colors - Light Mode */
    --bg-primary: linear-gradient(135deg, #ff9ff3 0%, #f368e0 25%, #f8acff 50%, #c44569 75%, #f8b500 100%);
    --bg-secondary: rgba(255, 255, 255, 0.9);
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent-pink: #fd79a8;
    --accent-purple: #a29bfe;
    --accent-blue: #74b9ff;
    --accent-green: #00b894;
    --accent-orange: #fdcb6e;
    --accent-red: #e17055;
    --window-bg: rgba(255, 255, 255, 0.95);
    --shadow: rgba(0, 0, 0, 0.1);
    --border: rgba(255, 255, 255, 0.3);
    --taskbar-bg: rgba(255, 255, 255, 0.85);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #2d3436 0%, #636e72 25%, #74b9ff 50%, #a29bfe 75%, #fd79a8 100%);
    --bg-secondary: rgba(45, 52, 54, 0.9);
    --text-primary: #ddd;
    --text-secondary: #b2bec3;
    --window-bg: rgba(45, 52, 54, 0.95);
    --shadow: rgba(0, 0, 0, 0.3);
    --border: rgba(255, 255, 255, 0.1);
    --taskbar-bg: rgba(45, 52, 54, 0.85);
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--window-bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 20px;
    min-width: 300px;
    max-width: 400px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px var(--shadow);
    z-index: 10000;
    transform: translateX(450px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
}

.notification.show {
    transform: translateX(0);
}

.notification-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--accent-green);
}

.notification-header i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.notification-content {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: var(--accent-red);
    color: white;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    background-size: 400% 400%;
    animation: gradientShift 15s ease-in-out infinite;
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    user-select: none;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(162, 155, 254, 0.2) 0%, transparent 50%);
    animation: floatingOrbs 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* Gradient Animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
}

/* Floating Orbs Animation */
@keyframes floatingOrbs {
    0%, 100% {
        transform: translate(0px, 0px) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Sperrbildschirm */
#lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#lock-screen.hidden {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.lock-time {
    font-size: 4rem;
    font-weight: 300;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.lock-date {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
    margin-bottom: 3rem;
}

.unlock-text {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.1);
    padding: 1rem 2rem;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.unlock-text:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Rechtliche Links auf Sperrbildschirm */
.legal-links {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 100;
}

.legal-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.legal-link:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.legal-link i {
    font-size: 16px;
}

/* Cookie-Hinweis */
.cookie-notice {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 15px 25px;
    max-width: 90%;
    z-index: 100;
    animation: slideUp 0.5s ease-out;
    display: none; /* Initial versteckt, wird durch JS gesteuert */
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-size: 14px;
}

.cookie-content i {
    color: var(--accent-orange);
    font-size: 18px;
}

.cookie-accept {
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cookie-accept:hover {
    background: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.cookie-notice.hidden {
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Shutdown Screen */
#shutdown-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d3436 0%, #636e72 50%, #2d3436 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#shutdown-screen.show {
    opacity: 1;
}

.shutdown-animation {
    text-align: center;
    color: white;
}

.shutdown-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.shutdown-text {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.shutdown-progress {
    width: 300px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Desktop */
#desktop {
    width: 100%;
    height: 100vh;
    position: relative;
    padding: 80px 20px 80px 20px;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 175, 189, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(162, 155, 254, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(116, 185, 255, 0.05) 0%, transparent 70%);
    animation: desktopBreathing 25s ease-in-out infinite;
}

/* Desktop Breathing Animation */
@keyframes desktopBreathing {
    0%, 100% {
        background-size: 100% 100%, 100% 100%, 150% 150%;
        transform: translateY(0px);
    }
    25% {
        background-size: 120% 120%, 110% 110%, 160% 160%;
        transform: translateY(-2px);
    }
    50% {
        background-size: 110% 110%, 130% 130%, 140% 140%;
        transform: translateY(2px);
    }
    75% {
        background-size: 130% 130%, 120% 120%, 170% 170%;
        transform: translateY(-1px);
    }
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--taskbar-bg);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.theme-switch {
    background: var(--accent-purple);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.theme-switch:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.datetime {
    color: var(--text-primary);
    font-weight: 500;
}

.wifi-menu, .power-menu {
    position: relative;
}

.wifi-icon, .power-icon {
    background: var(--accent-blue);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.power-icon {
    background: var(--accent-red);
}

.wifi-icon:hover, .power-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.wifi-dropdown, .power-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--window-bg);
    border-radius: 15px;
    padding: 15px;
    min-width: 250px;
    box-shadow: 0 10px 30px var(--shadow);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.wifi-dropdown.show, .power-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wifi-network, .power-option {
    padding: 10px 15px;
    margin: 5px 0;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wifi-network:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateX(5px);
}

.power-option:hover {
    background: var(--accent-red);
    color: white;
    transform: translateX(5px);
}

/* Desktop Icons Container */
.desktop-icons-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Desktop Icons */
.desktop-icon {
    position: absolute;
    width: 80px;
    text-align: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    animation: iconFloat 6s ease-in-out infinite;
    /* Sofortige Verfügbarkeit für Interaktionen */
    opacity: 1;
    pointer-events: auto;
    /* Bessere Click-Area */
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    /* Verhindere Drag-Verhalten */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* Set desktop positions for icons */
.desktop-icon:nth-child(1) { top: 100px; left: 50px; }        /* REMOTE */
.desktop-icon:nth-child(2) { top: 200px; left: 50px; }        /* Portfolio */
.desktop-icon:nth-child(3) { top: 200px; left: 160px; }       /* GitHub */
.desktop-icon:nth-child(4) { top: 300px; left: 50px; }        /* E-Mail */
.desktop-icon:nth-child(5) { top: 300px; left: 160px; }       /* Instagram */
.desktop-icon:nth-child(6) { top: 400px; left: 50px; }        /* visitenkarte.png */
.desktop-icon:nth-child(7) { top: 400px; left: 160px; }       /* Datenbanken */
.desktop-icon:nth-child(8) { top: 100px; right: 160px; }      /* Rechner */
.desktop-icon:nth-child(9) { top: 100px; right: 50px; }       /* Editor */
.desktop-icon:nth-child(10) { top: 200px; right: 50px; }      /* Paint */
.desktop-icon:nth-child(11) { bottom: 120px; left: 50px; }    /* fertig.txt */
.desktop-icon:nth-child(12) { bottom: 120px; left: 160px; }   /* fertig2.txt */
.desktop-icon:nth-child(13) { bottom: 120px; left: 270px; }   /* fertigfertig3.txt */
.desktop-icon:nth-child(14) { bottom: 120px; right: 160px; }  /* Impressum */
.desktop-icon:nth-child(15) { bottom: 120px; right: 50px; }   /* Datenschutz */

.desktop-icon:hover {
    transform: translateY(-5px);
    animation-play-state: paused;
    z-index: 20;
}

/* Icon floating animation */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(0.5deg);
    }
    50% {
        transform: translateY(2px) rotate(-0.5deg);
    }
    75% {
        transform: translateY(-1px) rotate(0.3deg);
    }
}

.icon-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    /* Verhindere Drag auf Icon Images */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    /* Icon Image sollte klickbar bleiben */
    pointer-events: auto;
}

.desktop-icon:hover .icon-image {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.icon-label {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    text-align: center;
    width: 100%;
    height: 32px;
    line-height: 16px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    /* Verhindere Drag auf Labels */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    /* Label sollte klickbar bleiben */
    pointer-events: auto;
}

/* Fenster */
.window {
    position: absolute;
    background: var(--window-bg);
    border-radius: 15px;
    box-shadow: 0 20px 40px var(--shadow);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    min-width: 400px;
    min-height: 300px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    touch-action: none;
    user-select: none;
    z-index: 100;
}

.window.show {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.window-header {
    height: 50px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    cursor: move;
    color: white;
    touch-action: none;
    user-select: none;
}

.window-title {
    font-weight: 600;
    font-size: 1.1rem;
}

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

.window-minimize, .window-maximize, .window-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.window-minimize:hover {
    background: var(--accent-orange);
    transform: scale(1.1);
}

.window-maximize:hover {
    background: var(--accent-green);
    transform: scale(1.1);
}

.window-close:hover {
    background: var(--accent-red);
    transform: scale(1.1);
}

.window.maximized {
    top: 60px !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 120px) !important;
    border-radius: 0 !important;
    transform: none !important;
}

.window.maximized .window-header {
    border-radius: 0;
}

.window.maximized .window-content {
    max-height: none !important;
    height: calc(100vh - 170px) !important;
    overflow-y: auto;
}

.window.minimized {
    display: none !important;
}

.window-content {
    padding: 30px;
    color: var(--text-primary);
    overflow-y: auto;
    max-height: 400px;
}

/* Editor Fenster */
.editor-textarea {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-primary);
    resize: vertical;
    margin-bottom: 15px;
}

.save-button {
    background: var(--accent-green);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Taschenrechner */
.calculator {
    max-width: 350px;
    margin: 0 auto;
}

.calc-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 25px;
    font-size: 2.2rem;
    text-align: right;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-height: 55px;
}

.calc-number {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.calc-operator {
    background: var(--accent-blue);
    color: white;
}

.calc-equals {
    background: var(--accent-green);
    color: white;
    grid-row: span 2;
}

.calc-clear {
    background: var(--accent-red);
    color: white;
}

.calc-zero {
    grid-column: span 2;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Taskleiste */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--taskbar-bg);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-top: 1px solid var(--border);
}

.start-button {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.taskbar-programs {
    display: flex;
    gap: 5px;
    margin-left: 15px;
    flex: 1;
}

.taskbar-program {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: fit-content;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-program:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
}

.taskbar-program.active {
    background: var(--accent-purple);
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.taskbar-program.minimized {
    opacity: 0.7;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.start-menu {
    position: absolute;
    bottom: 80px;
    left: 20px;
    background: var(--window-bg);
    border-radius: 15px;
    padding: 20px;
    min-width: 200px;
    box-shadow: 0 15px 35px var(--shadow);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.start-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    padding: 12px 15px;
    margin: 5px 0;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateX(5px);
}

/* Animationen */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.desktop-icon {
    animation: fadeInUp 0.6s ease forwards;
}

.desktop-icon:nth-child(1) { animation-delay: 0.1s; }
.desktop-icon:nth-child(2) { animation-delay: 0.2s; }
.desktop-icon:nth-child(3) { animation-delay: 0.3s; }

/* Responsive Design */
@media (max-width: 768px) {
    .lock-time {
        font-size: 3rem;
    }
    
    .topbar, .taskbar {
        padding: 0 15px;
    }
    
    .window {
        min-width: 90%;
        min-height: 60%;
    }
    
    .desktop-icon {
        width: 70px;
    }
    
    .icon-image {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .top-right {
        gap: 10px;
    }
    
    .datetime {
        font-size: 0.9rem;
    }
}

/* External Website Warning Dialog */
.warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.warning-dialog {
    background: var(--window-bg);
    border-radius: 15px;
    padding: 30px;
    max-width: 450px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    backdrop-filter: blur(20px);
    border: 2px solid var(--border);
}

.warning-icon {
    font-size: 3rem;
    color: var(--accent-orange);
    margin-bottom: 20px;
}

.warning-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.warning-message {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
}

.warning-url {
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    color: var(--accent-blue);
    margin-bottom: 25px;
    word-break: break-all;
}

.warning-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.warning-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.warning-btn.ok {
    background: var(--accent-green);
    color: white;
}

.warning-btn.ok:hover {
    background: #00a085;
    transform: translateY(-2px);
}

.warning-btn.cancel {
    background: var(--accent-red);
    color: white;
}

.warning-btn.cancel:hover {
    background: #d63031;
    transform: translateY(-2px);
}

/* Animation für Warning Dialog */
.warning-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.warning-overlay.show .warning-dialog {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Paint App Styles */
.paint-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

.paint-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-bottom: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.tool-group h4 {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Paint Tools */
.paint-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.paint-tool:hover {
    background: var(--accent-pink);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.3);
}

.paint-tool.active {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: white;
    border-color: var(--accent-pink);
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
}

/* Size Slider */
.size-slider {
    width: 100px;
    height: 6px;
    background: #f0f0f0;
    outline: none;
    border-radius: 3px;
    cursor: pointer;
}

.size-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(253, 121, 168, 0.3);
}

.size-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(253, 121, 168, 0.3);
}

#brush-size-display {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    min-width: 40px;
}

/* Color Palette */
.color-palette {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-width: 120px;
}

.color-swatch {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.color-swatch.active {
    border-color: var(--accent-pink);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
}

.color-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Action Buttons */
.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.action-btn i {
    font-size: 14px;
}

/* Canvas Container */
.paint-canvas-container {
    flex: 1;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

#paint-canvas {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: crosshair;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    /* Immer zentriert mit flexiblen Rändern */
    width: auto;
    height: auto;
    max-width: calc(100% - 40px);
    max-height: calc(100% - 40px);
    min-width: 300px;
    min-height: 200px;
    /* Zentriert durch Flexbox des Containers */
    position: relative;
}

#paint-canvas:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* Paint Window Specific Styles */
#paint-window {
    /* Keine feste Breite - verwende responsive Standardbreite wie andere Fenster */
    height: 600px;
    min-height: 500px;
}

#paint-window .window-content {
    padding: 0;
    height: calc(100% - 40px);
}

/* ==================== Desktop Logo Styles ==================== */
.desktop-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0.5;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    animation: logoFloat 4s ease-in-out infinite;
}

.logo-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, 
        rgba(253, 121, 168, 0.8) 0%, 
        rgba(162, 155, 254, 0.8) 25%, 
        rgba(116, 185, 255, 0.8) 50%, 
        rgba(0, 184, 148, 0.8) 75%, 
        rgba(253, 203, 110, 0.8) 100%);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 10px;
}

.logo-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Floating Animation */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(0.5deg);
    }
    50% {
        transform: translateY(-8px) rotate(0deg);
    }
    75% {
        transform: translateY(-3px) rotate(-0.5deg);
    }
}

/* Desktop Logo Hover Effects */
.desktop-logo:hover .logo-container {
    opacity: 0.85;
    transform: scale(1.08) rotate(2deg);
    filter: brightness(1.3) drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
    animation: logoFloat 2s ease-in-out infinite;
}

.desktop-logo:active .logo-container {
    transform: scale(0.95) rotate(-1deg);
    transition: all 0.2s ease-out;
    animation: none;
}

/* Responsive Design für Desktop Logo */
@media (max-width: 768px) {
    .logo-icon {
        width: 100px;
        height: 100px;
        font-size: 36px;
    }
    
    .logo-image {
        width: 60px;
        height: 60px;
    }
    
    .logo-text {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }
    
    .logo-image {
        width: 50px;
        height: 50px;
    }
    
    .logo-text {
        font-size: 16px;
    }
}

/* ==================== MOBILE OS RESPONSIVE DESIGN ==================== */

/* Mobile Devices (Smartphones) - Mobile OS Layout */
@media only screen and (max-width: 768px) {
    
    /* Mobile Rechtliche Links */
    .legal-links {
        bottom: 180px;
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .legal-link {
        font-size: 16px;
        padding: 12px 20px;
        min-width: 140px;
        justify-content: center;
    }
    
    /* Mobile Cookie-Hinweis */
    .cookie-notice {
        bottom: 20px;
        left: 20px;
        right: 20px;
        transform: none;
        max-width: none;
        padding: 20px;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cookie-accept {
        padding: 12px 20px;
        font-size: 14px;
        align-self: center;
    }
    
    /* Mobile OS Desktop Layout */
    #desktop {
        padding: 0;
        background: 
            linear-gradient(135deg, #667eea 0%, #764ba2 100%),
            radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
        background-size: 100% 100%, 200% 200%, 150% 150%;
        animation: mobileGradient 20s ease-in-out infinite;
        overflow-y: auto;
        overflow-x: hidden;
        display: block !important;
    }
    
    /* Mobile Dark Theme Background */
    [data-theme="dark"] #desktop {
        background: 
            linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%),
            radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%);
        background-size: 100% 100%, 200% 200%, 150% 150%;
        animation: mobileGradientDark 20s ease-in-out infinite;
    }
    
    @keyframes mobileGradient {
        0%, 100% {
            background-position: 0% 0%, 0% 0%, 100% 100%;
        }
        25% {
            background-position: 100% 0%, 50% 50%, 0% 0%;
        }
        50% {
            background-position: 100% 100%, 100% 0%, 50% 50%;
        }
        75% {
            background-position: 0% 100%, 0% 100%, 100% 0%;
        }
    }
    
    @keyframes mobileGradientDark {
        0%, 100% {
            background-position: 0% 0%, 0% 0%, 100% 100%;
        }
        25% {
            background-position: 100% 0%, 50% 50%, 0% 0%;
        }
        50% {
            background-position: 100% 100%, 100% 0%, 50% 50%;
        }
        75% {
            background-position: 0% 100%, 0% 100%, 100% 0%;
        }
    }

    /* Mobile Status Bar */
    .topbar {
        height: 44px;
        background: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(20px);
        border-bottom: none;
        padding: 0 20px;
        position: fixed;
        top: 0;
        z-index: 3500;
    }
    
    .topbar .theme-switch {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        font-size: 12px;
        padding: 6px 12px;
        border-radius: 16px;
    }
    
    .datetime {
        color: white;
        font-weight: 600;
        font-size: 14px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    .wifi-icon, .power-icon {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        width: 32px;
        height: 32px;
        border-radius: 16px;
        font-size: 12px;
    }

    /* Mobile Desktop Icons Container */
    .desktop-icons-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding: 60px 20px 100px 20px;
        min-height: calc(100vh - 160px);
        align-content: start;
        position: relative;
        /* IMPORTANT: High z-index to ensure icons are clickable */
        z-index: 2500;
    }

    /* Mobile App Icons */
    .desktop-icon {
        position: relative !important;
        top: unset !important;
        left: unset !important;
        right: unset !important;
        bottom: unset !important;
        width: 70px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        animation: mobileIconFloat 4s ease-in-out infinite;
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        /* Better mobile touch response */
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        /* IMPORTANT: Higher z-index for mobile to ensure clickability */
        z-index: 2500 !important;
        position: relative;
    }
    
    /* Add specific touch optimizations for file items too */
    @media (max-width: 768px) {
        .file-item {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            cursor: pointer;
        }
    }
    
    .desktop-icon:nth-child(1) { animation-delay: 0s; }
    .desktop-icon:nth-child(2) { animation-delay: 0.5s; }
    .desktop-icon:nth-child(3) { animation-delay: 1s; }
    .desktop-icon:nth-child(4) { animation-delay: 1.5s; }
    .desktop-icon:nth-child(5) { animation-delay: 2s; }
    .desktop-icon:nth-child(6) { animation-delay: 2.5s; }
    .desktop-icon:nth-child(7) { animation-delay: 3s; }
    .desktop-icon:nth-child(8) { animation-delay: 3.5s; }
    
    @keyframes mobileIconFloat {
        0%, 100% {
            transform: translateY(0px) scale(1);
        }
        50% {
            transform: translateY(-2px) scale(1.02);
        }
    }
    
    .desktop-icon .icon-image {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        box-shadow: 
            0 4px 12px rgba(0, 0, 0, 0.2),
            0 2px 4px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        font-size: 1.8rem;
        margin-bottom: 8px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .desktop-icon:active .icon-image {
        transform: scale(0.9);
        box-shadow: 
            0 2px 6px rgba(0, 0, 0, 0.2),
            0 1px 2px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    
    .desktop-icon .icon-label {
        color: white;
        font-size: 11px;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        text-align: center;
        line-height: 1.2;
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Mobile Desktop Logo */
    .desktop-logo {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
        opacity: 0.1;
        pointer-events: none;
    }
    
    .desktop-logo .logo-image {
        width: 120px;
        height: auto;
    }

    /* Mobile Dock/Taskbar */
    .taskbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 20px;
        z-index: 3500;
    }
    
    .start-button {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
    }
    
    .start-button:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
    }
    
    .taskbar-programs {
        display: none; /* Hide running programs on mobile */
    }

    /* Mobile Start Menu */
    .start-menu {
        bottom: 90px;
        left: 20px;
        right: 20px;
        width: auto;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(30px);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.15),
            0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .start-menu .menu-item {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 16px;
        margin: 8px;
        background: rgba(0, 0, 0, 0.05) !important;
        color: var(--text-primary) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
    }
    
    .start-menu .menu-item:hover,
    .start-menu .menu-item:active {
        background: rgba(0, 0, 0, 0.1) !important;
        color: var(--text-primary) !important;
    }
    
    /* Light theme specific fixes for mobile start menu */
    [data-theme="light"] .start-menu .menu-item {
        background: rgba(0, 0, 0, 0.8) !important;
        color: white !important;
        border: 1px solid rgba(0, 0, 0, 0.9) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }
    
    [data-theme="light"] .start-menu .menu-item:hover,
    [data-theme="light"] .start-menu .menu-item:active {
        background: rgba(0, 0, 0, 0.9) !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
        transform: scale(1.02);
    }
    
    /* Dark theme specific fixes for mobile start menu */
    [data-theme="dark"] .start-menu .menu-item {
        background: rgba(30, 30, 30, 0.95) !important;
        color: white !important;
        border: 1px solid rgba(60, 60, 60, 0.8) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    }
    
    [data-theme="dark"] .start-menu .menu-item:hover,
    [data-theme="dark"] .start-menu .menu-item:active {
        background: rgba(45, 45, 45, 0.98) !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
        transform: scale(1.02);
    }
    
    .start-menu .menu-item i {
        width: 24px;
        font-size: 18px;
    }

    /* Mobile Windows */
    .window {
        top: 50px !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 90px !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 16px;
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.2),
            0 10px 20px rgba(0, 0, 0, 0.1);
        /* IMPORTANT: Ensure windows appear above desktop icons in mobile but below notifications */
        z-index: 3000 !important;
    }
    
    /* IMPORTANT: Hide windows by default in mobile, only show when .show class is present */
    .window:not(.show) {
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
    
    .window-header {
        height: 56px;
        padding: 0 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .window-title {
        font-size: 18px;
        font-weight: 600;
    }
    
    .window-controls button {
        width: 32px;
        height: 32px;
        border-radius: 16px;
        font-size: 14px;
    }
    
    .window-content {
        padding: 20px 16px;
        height: calc(100% - 56px);
        overflow-y: auto;
    }

    /* Mobile Calculator */
    .calculator {
        max-width: 100%;
    }
    
    .calc-display {
        font-size: 32px;
        height: 80px;
        border-radius: 12px;
    }
    
    .calc-buttons {
        gap: 12px;
    }
    
    .calc-btn {
        height: 60px;
        font-size: 18px;
        border-radius: 12px;
    }

    /* Mobile Paint - Optimierte Layout-Struktur */
    .paint-toolbar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        padding: 12px;
        background: var(--bg-secondary);
        border-bottom: 2px solid #ddd;
        border-radius: 8px 8px 0 0;
        align-items: flex-start;
    }
    
    .tool-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
        min-width: 120px;
    }
    
    .tool-group h4 {
        font-size: 12px;
        margin: 0;
        color: var(--text-secondary);
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 1px;
        text-align: center;
    }
    
    /* Tools & Actions - Alle Buttons nebeneinander in einer Reihe */
    .tools-and-actions {
        display: flex;
        flex-direction: row;
        gap: 6px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
    }
    
    .paint-tool,
    .tools-and-actions .action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 38px;
        width: 38px;
        height: 35px;
        padding: 0;
        font-size: 14px;
        border: 2px solid #ddd;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .paint-tool {
        background: white;
        color: var(--text-primary);
    }
    
    .tools-and-actions .action-btn {
        background: white;
        color: var(--accent-pink);
        border-color: var(--accent-pink);
    }
    
    .paint-tool:hover {
        background: var(--accent-pink);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(253, 121, 168, 0.3);
    }
    
    .tools-and-actions .action-btn:hover {
        background: var(--accent-pink);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(253, 121, 168, 0.4);
    }
    
    .paint-tool.active {
        background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
        color: white;
        border-color: var(--accent-pink);
        box-shadow: 0 3px 10px rgba(253, 121, 168, 0.4);
    }
    
    /* Size Control - Vertical Layout for mobile */
    .tool-group:nth-child(2) > :not(h4) {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .size-slider {
        width: 80px;
        height: 6px;
        background: #ddd;
        border-radius: 3px;
        outline: none;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .size-slider::-webkit-slider-thumb {
        appearance: none;
        width: 16px;
        height: 16px;
        background: var(--accent-pink);
        border-radius: 50%;
        cursor: pointer;
    }
    
    #brush-size-display {
        font-size: 12px;
        font-weight: bold;
        color: var(--accent-pink);
        text-align: center;
    }
    
    /* Color Palette - Compact Grid Layout */
    .color-palette {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        width: 100%;
        padding: 2px;
    }
    
    .color-swatch {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        border: 2px solid transparent;
        cursor: pointer;
        transition: all 0.2s ease;
        justify-self: center;
    }
    
    .color-swatch:hover {
        transform: scale(1.1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .color-swatch.active {
        border-color: var(--accent-pink);
        transform: scale(1.1);
        box-shadow: 0 2px 10px rgba(253, 121, 168, 0.6);
    }
    
    /* Mobile: Canvas Container */
    .canvas-container {
        margin-top: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex: 1;
        background: #f8f9fa;
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
        position: relative;
    }
    
    .paint-canvas-container {
        height: calc(100vh - 220px);
        min-height: 200px;
        padding: 6px;
        overflow: auto;
    }
    
    #paint-canvas {
        max-width: 100%;
        max-height: 100%;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: white;
    }

    /* Mobile Editor */
    .editor-textarea {
        height: 300px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    .save-button {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        border-radius: 12px;
    }

    /* Mobile Lock Screen */
    #lock-screen {
        background: 
            linear-gradient(135deg, #667eea 0%, #764ba2 100%),
            radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    }
    
    .lock-time {
        font-size: 3rem;
        font-weight: 200;
    }
    
    .lock-date {
        font-size: 1.2rem;
    }
    
    .unlock-text {
        font-size: 16px;
        padding: 14px 24px;
        border-radius: 25px;
    }

    /* Mobile Notifications */
    .notification {
        top: 60px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        border-radius: 16px;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }

    /* Mobile Dropdowns */
    .wifi-dropdown, .power-dropdown {
        right: 10px;
        top: 50px;
        left: auto;
        width: calc(100vw - 20px);
        max-width: 300px;
        border-radius: 16px;
    }
    
    /* Mobile Windows - Optimized for Touch */
    .window {
        position: fixed !important;
        top: 44px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 60px !important;
        width: 100% !important;
        height: auto !important;
        border-radius: 0 !important;
        max-width: none !important;
        max-height: none !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .window-header {
        height: 50px;
        padding: 0 20px;
        background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 0;
        color: white;
    }
    
    /* Dark Mode Mobile Window Headers */
    [data-theme="dark"] .window-header {
        background: linear-gradient(135deg, #636e72, #2d3436);
        color: #ddd;
    }
    
    .window-title {
        font-size: 18px;
        font-weight: 600;
        /* Mobile text truncation for long paths */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 150px); /* Reserve space for window controls */
    }
    
    .window-content {
        height: calc(100vh - 154px) !important;
        max-height: none !important;
        padding: 20px;
        overflow-y: auto;
        border-radius: 0;
    }
    
    /* Mobile: Canvas Container */
    .canvas-container {
        margin-top: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex: 1;
        background: #f8f9fa;
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
        position: relative;
    }
    
    /* Calculator Mobile Optimization */
    #calculator-window .calculator {
        max-width: none;
        padding: 20px;
    }
    
    #calculator-window .calc-display {
        height: 80px;
        font-size: 28px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    #calculator-window .calc-btn {
        height: 60px;
        font-size: 20px;
        border-radius: 12px;
    }
    
    /* Folder Mobile Optimization */
    .folder-window .file-item {
        padding: 15px;
        border-radius: 12px;
        min-height: 60px;
    }
    
    .folder-window .file-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .folder-window .file-name {
        font-size: 14px;
        font-weight: 500;
    }
}

/* Tablet Devices */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    /* Keep desktop layout for tablets but with adjustments */
    #desktop {
        padding: 60px 40px 80px 40px;
    }
    
    .desktop-icon .icon-image {
        width: 70px;
        height: 70px;
    }
    
    .desktop-icon {
        width: 90px;
    }
    
    .window {
        min-width: 400px;
        min-height: 300px;
    }
}
