/* WOS 3.0 - Complete CSS for Vanilla JS Version - iOS 9 Compatible */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#app {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

.wos {
    height: 100vh;
    width: 100vw;
    background: #000;
    position: relative;
    overflow: hidden;
}

.wos-content {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

/* Lock Screen */
.lockscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.lockscreen-content {
    text-align: center;
    width: 100%;
    padding: 0 40px;
}

.time-display {
    margin-bottom: 60px;
}

.time {
    font-size: 72px;
    font-weight: 200;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.date {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.unlock-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.8;
}

.unlock-text {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.unlock-text-desktop {
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 8px;
    opacity: 0.7;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.unlock-arrow {
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Passcode Screen */
.passcode-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cancel-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: #007AFF;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}

.cancel-btn:active {
    opacity: 0.5;
}

.passcode-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.passcode-title {
    color: white;
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 40px;
}

.passcode-dots {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.passcode-dots.error {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    transition: all 0.2s;
}

.dot.filled {
    background: white;
    border-color: white;
}

.passcode-keypad {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
}

.key {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px;
    flex-shrink: 0;
}

.key:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.key.empty {
    background: transparent;
    cursor: default;
}

.key.delete {
    font-size: 28px;
}

/* Status Bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    font-size: 12px;
    z-index: 100;
    color: white;
}

.status-bar .time {
    font-size: 12px;
    font-weight: 500;
}

.status-left,
.status-center,
.status-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.status-center {
    justify-content: center;
}

.status-right {
    justify-content: flex-end;
}

.command-panel-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
}

/* Desktop */
.desktop {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    padding: 60px 20px 120px 20px;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.app-grid {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    padding: 20px 10px;
}

.app-grid .app-icon {
    width: 25%;
    box-sizing: border-box;
    padding: 14px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.app-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
}

.app-icon:active {
    transform: scale(0.9);
}

.app-icon:active .app-icon-img {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.app-icon-img {
    font-size: 48px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.app-icon-name {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
    margin-top: 2px;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Folder Styles */
.folder-icon {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 152, 0, 0.3)) !important;
}

.folder-preview {
    display: flex;
    flex-wrap: wrap;
}

.folder-preview .app-icon {
    width: 50%;
    box-sizing: border-box;
    padding: 2px;
}

.folder-mini-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.folder-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.folder-popup {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 24px;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.folder-header {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 20px;
}

.folder-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.folder-grid .app-icon {
    width: 33.33%;
    box-sizing: border-box;
    padding: 8px;
}

.folder-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.folder-app:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.05);
}

.folder-app-icon {
    font-size: 48px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(0, 122, 255, 0.1));
    border-radius: 14px;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.folder-app-name {
    font-size: 12px;
    font-weight: 500;
    color: #1d1d1f;
    text-align: center;
}

/* Dock */
.dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 380px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.dock-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dock-apps {
    position: relative;
    display: flex;
    gap: 16px;
    z-index: 1;
    justify-content: center;
    align-items: center;
}

.dock-app {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.dock-app:active {
    transform: scale(0.9);
}

.dock-app-icon {
    font-size: 40px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    border-radius: 16px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 200;
    min-width: 200px;
    animation: contextMenuIn 0.15s ease;
}

@keyframes contextMenuIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    color: #1d1d1f;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.context-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.context-menu-item:active {
    background: rgba(0, 0, 0, 0.1);
}

.context-menu-icon {
    font-size: 18px;
}

.context-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 4px 0;
}

/* Edit Mode */
.edit-mode-banner {
    position: fixed;
    top: 44px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    font-size: 14px;
}

.done-btn {
    background: white;
    color: #007AFF;
    border: none;
    padding: 6px 16px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.app-icon-wrapper.wiggle {
    animation: wiggle 0.5s ease-in-out infinite;
}

.app-icon.dragging {
    opacity: 0.7 !important;
    transform: scale(1.1) !important;
    z-index: 1000 !important;
    position: fixed !important;
    pointer-events: none !important;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(-1deg);
    }

    50% {
        transform: rotate(1deg);
    }
}

.remove-btn {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: rgba(255, 59, 48, 0.95);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.remove-btn:active {
    transform: scale(0.9);
}

/* App Library */
.app-library-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 350;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.app-library-popup {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 24px;
    max-width: 90%;
    max-height: 80%;
    width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
}

.app-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.app-library-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.close-btn {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.2);
}

.app-library-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.app-library-grid .app-icon {
    width: 20%;
    min-width: 80px;
    box-sizing: border-box;
    padding: 8px;
}

.library-app {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.library-app:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.05);
}

.library-app.hidden {
    opacity: 0.5;
}

.library-app-icon {
    font-size: 48px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(0, 122, 255, 0.1));
    border-radius: 14px;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.library-app-name {
    font-size: 12px;
    font-weight: 500;
    color: #1d1d1f;
    text-align: center;
}

.visible-badge,
.hidden-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.visible-badge {
    background: #34c759;
    color: white;
}

.hidden-badge {
    background: #007AFF;
    color: white;
}

/* App Window */
.app-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
    z-index: 200;
}

.app-window.minimized {
    display: none;
}

.app-header {
    height: 44px;
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    flex-shrink: 0;
}

.app-done {
    background: none;
    border: none;
    color: #007AFF;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
}

.app-done:active {
    opacity: 0.5;
}

.app-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

.app-spacer {
    width: 60px;
}

.app-content {
    flex: 1;
    overflow: auto;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

/* Command Panel */
.command-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 300;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    animation: fadeIn 0.2s ease;
}

.command-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 20px;
    max-width: 90%;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lock-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 59, 48, 0.05));
    border-radius: 16px;
    border: none;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.lock-button:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.2), rgba(255, 59, 48, 0.1));
}

.lock-icon {
    font-size: 32px;
}

.lock-button span {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

.control-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.slider-row:last-child {
    margin-bottom: 0;
}

.slider-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slider-value {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    min-width: 40px;
    text-align: right;
}

.music-widget {
    background: linear-gradient(135deg, rgba(255, 45, 85, 0.1), rgba(255, 45, 85, 0.05));
}

.music-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.music-title {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    text-align: center;
}

.music-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.music-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.music-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.1);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
}

.toggle-icon {
    font-size: 20px;
}

.toggle-switch {
    width: 51px;
    height: 31px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active {
    background: #34c759;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

.control-card .app-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.control-card .app-grid .app-icon {
    width: 50%;
    box-sizing: border-box;
    padding: 6px;
}

.app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.app-tile:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.1);
}

.tile-icon {
    font-size: 32px;
}

.tile-name {
    font-size: 12px;
    font-weight: 500;
    color: #1d1d1f;
}

/* Boot Screen */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.boot-content {
    text-align: center;
    width: 100%;
    max-width: 300px;
    padding: 0 40px;
}

.boot-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.boot-progress-container {
    width: 100%;
}

.boot-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.boot-progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.boot-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Setup Screen */
.setup-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.setup-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.setup-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.progress-dot.active {
    background: #007AFF;
    transform: scale(1.3);
}

.progress-dot.completed {
    background: #34c759;
}

.setup-content {
    text-align: center;
}

.setup-icon {
    margin-bottom: 24px;
}

.icon-large {
    font-size: 64px;
}

.setup-title {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.setup-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
}

.setup-error {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.setup-step {
    margin-bottom: 32px;
}

.welcome-text,
.complete-text,
.cloud-note {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 16px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.setup-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.2s;
}

.setup-input:focus {
    outline: none;
    border-color: #007AFF;
}

.wallpaper-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.wallpaper-grid .wallpaper-option {
    width: 33.33%;
    box-sizing: border-box;
    padding: 6px;
}

.wallpaper-option {
    height: 80px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.wallpaper-option:active {
    transform: scale(0.95);
}

.wallpaper-option.selected {
    border-color: #007AFF;
}

.wallpaper-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: #007AFF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.setup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: #007AFF;
    color: white;
}

.btn-primary:active {
    background: #0051D5;
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.btn-secondary:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.98);
}

.btn-primary.full-width,
.btn-secondary.full-width {
    width: 100%;
}

/* Responsive Design - iPod Touch Optimized */
@media (max-width: 640px) {
    .time {
        font-size: 56px;
    }

    .date {
        font-size: 15px;
    }

    .unlock-text {
        font-size: 12px;
    }

    .key {
        width: 65px;
        height: 65px;
        font-size: 26px;
    }

    .passcode-title {
        font-size: 17px;
    }

    .app-grid {
        padding: 15px 8px;
    }

    .app-grid .app-icon {
        padding: 10px 4px;
    }

    .app-icon-img {
        width: 52px;
        height: 52px;
        font-size: 40px;
    }

    .app-icon-name {
        font-size: 11px;
    }

    .setup-title {
        font-size: 22px;
    }

    .command-panel {
        max-width: 95%;
        padding: 16px;
    }

    .control-card {
        padding: 12px;
        margin-bottom: 10px;
    }
}

@media (max-width: 400px) {
    .key {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .app-icon-img {
        width: 56px;
        height: 56px;
        font-size: 44px;
    }

    .dock-app-icon {
        width: 58px;
        height: 58px;
        font-size: 36px;
    }
}

@media (max-width: 320px) {
    .time {
        font-size: 52px;
    }

    .date {
        font-size: 14px;
    }

    .app-grid {
        padding: 15px 5px;
    }

    .app-grid .app-icon {
        width: 25%;
        padding: 6px 2px;
    }

    .app-icon-img {
        width: 42px;
        height: 42px;
        font-size: 28px;
    }

    .app-icon-name {
        font-size: 9px;
        line-height: 1.1;
    }

    .dock {
        max-width: 300px;
        height: 76px;
    }

    .dock-app-icon {
        width: 54px;
        height: 54px;
        font-size: 32px;
    }

    .key {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .setup-container {
        padding: 24px;
    }

    .setup-title {
        font-size: 20px;
    }
}