:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-card: rgba(18, 18, 18, 0.95);
    --bg-card-solid: #121212;
    --bg-hover: rgba(255, 255, 255, 0.05);
    --bg-active: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --success: #00ff88;
    --error: #ff4444;
    --info: #3b82f6;
    --android-color: #3ddc84;
    --ios-color: #007aff;
    --web-color: #f59e0b;
    --tv-color: #8b5cf6;
    --store-color: #ec4899;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --transition: 0.2s ease;
    --focus-ring: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--info);
}

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

html { 
    font-size: 16px; 
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.5;
}

button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
}

button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

input:focus-visible,
select:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.bg-noise {
    position: fixed; 
    inset: 0; 
    z-index: -1; 
    opacity: 0.02; 
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-gradient {
    position: fixed; 
    inset: 0; 
    z-index: -2; 
    pointer-events: none;
    background: radial-gradient(ellipse at 20% 0%, rgba(60,60,80,0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 100%, rgba(80,60,60,0.1) 0%, transparent 50%);
}

::-webkit-scrollbar { 
    width: 6px; 
    height: 6px; 
}

::-webkit-scrollbar-track { 
    background: transparent; 
}

::-webkit-scrollbar-thumb { 
    background: var(--border-light); 
    border-radius: 3px; 
}

@supports (scrollbar-width: thin) {
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--border-light) transparent;
    }
}

.header {
    position: sticky; 
    top: 0; 
    z-index: 100;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 24px; 
    height: 64px;
    background: var(--bg-card); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.logo-icon {
    width: 40px; 
    height: 40px;
    background: linear-gradient(135deg, #fff, #ccc);
    border-radius: var(--radius-md);
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #000;
}

.logo-text { 
    font-size: 1.25rem; 
    font-weight: 700; 
}

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

.lang-btn {
    display: flex; 
    align-items: center; 
    gap: 8px;
    background: var(--bg-tertiary); 
    border: 1px solid var(--border-color);
    color: var(--text-primary); 
    padding: 8px 16px; 
    border-radius: var(--radius-md);
    font-size: 0.9rem; 
    cursor: pointer; 
    transition: var(--transition);
}

.lang-btn:hover { 
    border-color: var(--border-light); 
}

.mobile-lang-btn {
    display: none; 
    width: 40px; 
    height: 40px;
    background: var(--bg-tertiary); 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md); 
    color: var(--text-primary); 
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-lang-btn:hover {
    border-color: var(--border-light);
}

.desktop-nav {
    display: flex; 
    background: var(--bg-card); 
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px; 
    gap: 4px;
}

.nav-tab {
    display: flex; 
    align-items: center; 
    gap: 8px;
    padding: 16px 24px; 
    background: none; 
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary); 
    font-size: 0.95rem; 
    font-weight: 500;
    cursor: pointer; 
    transition: var(--transition);
}

.nav-tab:hover { 
    color: var(--text-primary); 
    background: var(--bg-hover); 
}

.nav-tab.active { 
    color: var(--text-primary); 
    border-bottom-color: var(--text-primary); 
}

.nav-tab:focus-visible {
    box-shadow: inset var(--focus-ring);
}

.lang-modal {
    position: fixed; 
    inset: 0; 
    z-index: 200;
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: rgba(0,0,0,0.8); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0; 
    visibility: hidden; 
    transition: var(--transition);
}

.lang-modal.active { 
    opacity: 1; 
    visibility: visible; 
}

.lang-modal-content {
    background: var(--bg-card-solid); 
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); 
    padding: 24px;
    width: 90%; 
    max-width: 400px;
    transform: scale(0.9); 
    transition: transform 0.3s ease;
}

.lang-modal.active .lang-modal-content { 
    transform: scale(1); 
}

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

.lang-modal-title { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 1.1rem;
    font-weight: 600;
}

.lang-modal-close {
    width: 36px; 
    height: 36px; 
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-sm);
    color: var(--text-secondary); 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lang-modal-close:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

.lang-options { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 8px; 
}

.lang-option {
    display: flex; 
    align-items: center; 
    gap: 12px;
    padding: 12px 16px; 
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md);
    cursor: pointer; 
    transition: var(--transition);
    width: 100%;
    text-align: left;
    font-size: inherit;
    color: inherit;
}

.lang-option:hover { 
    border-color: var(--border-light); 
}

.lang-option.active { 
    border-color: var(--text-primary); 
    background: var(--bg-active); 
}

.lang-option-flag { 
    font-size: 1.5rem;
    line-height: 1;
}

.lang-option-name { 
    font-size: 0.9rem; 
}

.lang-option-check { 
    margin-left: auto; 
    color: var(--success); 
    opacity: 0;
    transition: var(--transition);
}

.lang-option.active .lang-option-check { 
    opacity: 1; 
}

.main-container {
    display: flex; 
    flex-direction: column; 
    gap: 24px;
    padding: 24px; 
    max-width: 800px; 
    margin: 0 auto;
    min-height: calc(100vh - 128px);
}

.panel {
    display: none; 
    flex-direction: column; 
    gap: 16px;
    background: var(--bg-card); 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); 
    padding: 24px;
}

.panel.active { 
    display: flex; 
}

.panel-header { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding-bottom: 16px; 
    border-bottom: 1px solid var(--border-color); 
}

.panel-header .material-symbols-rounded { 
    color: var(--text-secondary); 
    font-size: 1.4rem; 
}

.panel-title { 
    font-size: 1.2rem; 
    font-weight: 600; 
}

.preview-panel { 
    background: transparent; 
    border: none; 
    padding: 0; 
    align-items: center; 
}

.preview-panel .panel-header {
    background: var(--bg-card); 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); 
    padding: 20px; 
    width: 100%; 
    max-width: 400px;
}

.tabs {
    display: flex; 
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg); 
    padding: 4px; 
    gap: 4px;
    border: 1px solid var(--border-color);
}

.tab {
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    padding: 12px 16px; 
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary); 
    font-size: 0.9rem; 
    font-weight: 500;
    border-radius: var(--radius-md); 
    cursor: pointer; 
    transition: var(--transition);
}

.tab:hover { 
    background: var(--bg-hover); 
    color: var(--text-primary);
    border-color: var(--border-light);
}

.tab:not(.active) {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
}

.tab.active { 
    background: var(--text-primary); 
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.tab-content { 
    display: none; 
    flex-direction: column; 
    gap: 16px; 
}

.tab-content.active { 
    display: flex; 
}

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

.input-label { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.8rem; 
    color: var(--text-secondary); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    font-weight: 600; 
}

.input-field {
    width: 100%; 
    background: var(--bg-tertiary); 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md); 
    padding: 14px 16px;
    color: var(--text-primary); 
    font-size: 1rem; 
    transition: var(--transition);
}

.input-field:focus { 
    outline: none; 
    border-color: var(--border-light); 
}

.input-field:focus-visible {
    box-shadow: var(--focus-ring);
}

.section-title { 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: var(--text-muted); 
    margin-top: 8px; 
}

.divider { 
    height: 1px; 
    background: var(--border-color); 
    margin: 8px 0; 
}

.hint-text { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    font-style: italic; 
}

.upload-zone {
    position: relative; 
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-xl); 
    padding: 40px 20px;
    text-align: center; 
    cursor: pointer; 
    transition: var(--transition);
    min-height: 160px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.upload-zone:hover { 
    border-color: var(--text-secondary); 
}

.upload-zone:focus-within {
    border-color: var(--info);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.upload-zone.dragover { 
    border-color: var(--text-primary); 
    background: var(--bg-hover); 
}

.upload-zone.active { 
    border-color: var(--success); 
    border-style: solid; 
}

.upload-zone.has-image .upload-content { 
    opacity: 0; 
    pointer-events: none; 
}

.upload-content { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 12px; 
}

.upload-icon { 
    font-size: 3rem; 
    color: var(--text-secondary); 
}

.upload-title { 
    font-weight: 600; 
    font-size: 1rem; 
}

.upload-subtitle { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
}

.upload-preview {
    position: absolute; 
    inset: 0; 
    width: 100%; 
    height: 100%;
    object-fit: contain; 
    padding: 20px; 
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl); 
    display: none;
}

.upload-zone.has-image .upload-preview { 
    display: block; 
}

.upload-mini {
    display: flex; 
    align-items: center; 
    gap: 16px;
    padding: 16px; 
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-lg); 
    cursor: pointer; 
    transition: var(--transition);
}

.upload-mini:hover { 
    border-color: var(--text-secondary); 
}

.upload-mini.active { 
    border-color: var(--success); 
    border-style: solid; 
}

.upload-mini-icon {
    width: 48px; 
    height: 48px; 
    background: var(--bg-tertiary);
    border-radius: var(--radius-md); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.upload-mini-text { 
    flex: 1;
    min-width: 0;
}

.upload-mini-title { 
    font-size: 0.95rem; 
    font-weight: 500; 
}

.upload-mini-subtitle { 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    margin-top: 2px; 
}

.upload-mini-status { 
    color: var(--success); 
    opacity: 0; 
    transition: var(--transition);
    flex-shrink: 0;
}

.upload-mini.active .upload-mini-status { 
    opacity: 1; 
}

.mono-section {
    display: block;
}

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

.toggle-label { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.95rem; 
    font-weight: 500; 
}

.toggle-label .material-symbols-rounded { 
    font-size: 1.3rem; 
    color: var(--text-secondary); 
}

.badge {
    padding: 4px 8px; 
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm); 
    font-size: 0.65rem; 
    font-weight: 600;
    text-transform: uppercase; 
    letter-spacing: 0.3px; 
    color: var(--text-secondary);
}

.toggle-switch { 
    position: relative; 
    width: 48px; 
    height: 26px; 
}

.toggle-switch input { 
    opacity: 0; 
    width: 0; 
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute; 
    inset: 0; 
    background: var(--bg-tertiary);
    border-radius: 26px; 
    border: 1px solid var(--border-color); 
    cursor: pointer; 
    transition: var(--transition);
}

.toggle-slider::before {
    content: ""; 
    position: absolute; 
    height: 20px; 
    width: 20px;
    left: 2px; 
    bottom: 2px; 
    background: var(--text-secondary);
    border-radius: 50%; 
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider { 
    background: var(--text-primary); 
    border-color: var(--text-primary); 
}

.toggle-switch input:checked + .toggle-slider::before { 
    transform: translateX(22px); 
    background: var(--bg-primary); 
}

.toggle-switch input:focus-visible + .toggle-slider {
    box-shadow: var(--focus-ring);
}

.color-picker-row { 
    display: flex; 
    gap: 12px; 
    align-items: center; 
}

.color-input-wrapper { 
    width: 48px; 
    height: 48px;
    flex-shrink: 0;
}

.color-input { 
    width: 100%; 
    height: 100%; 
    border: none; 
    border-radius: var(--radius-md); 
    cursor: pointer; 
    padding: 0;
    background: transparent;
}

.color-input::-webkit-color-swatch-wrapper { 
    padding: 0; 
}

.color-input::-webkit-color-swatch { 
    border: 2px solid var(--border-light); 
    border-radius: var(--radius-md); 
}

.color-input::-moz-color-swatch {
    border: 2px solid var(--border-light); 
    border-radius: var(--radius-md);
}

.color-text { 
    flex: 1; 
    text-transform: uppercase; 
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; 
    font-size: 0.95rem;
    min-width: 0;
}

.color-presets { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
    margin-top: 8px; 
}

.color-preset {
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    cursor: pointer;
    border: 2px solid transparent; 
    transition: var(--transition);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    padding: 0;
}

.color-preset:hover { 
    transform: scale(1.15); 
}

.color-preset.active { 
    border-color: var(--text-primary); 
}

.color-preset:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), inset 0 0 0 1px rgba(255,255,255,0.1);
}

.range-wrapper {
    display: flex; 
    align-items: center; 
    gap: 12px;
    background: var(--bg-tertiary); 
    padding: 16px;
    border-radius: var(--radius-lg); 
    border: 1px solid var(--border-color);
}

.range-label { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-family: monospace; 
    min-width: 36px; 
    text-align: center; 
}

.range-slider { 
    flex: 1; 
    -webkit-appearance: none; 
    appearance: none;
    height: 6px; 
    background: var(--border-light); 
    border-radius: 3px;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none; 
    width: 20px; 
    height: 20px;
    background: var(--text-primary); 
    border-radius: 50%; 
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
    width: 20px; 
    height: 20px;
    background: var(--text-primary); 
    border-radius: 50%; 
    cursor: pointer;
    border: none;
}

.range-slider::-moz-range-track {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
}

.range-slider:focus-visible {
    outline: none;
}

.range-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: var(--focus-ring);
}

.range-slider:focus-visible::-moz-range-thumb {
    box-shadow: var(--focus-ring);
}

.range-value-display { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 12px; 
    margin-top: 12px; 
}

.range-value { 
    font-size: 1.5rem; 
    font-weight: 700; 
    font-family: monospace; 
    min-width: 80px; 
    text-align: center; 
}

.reset-btn {
    width: 36px; 
    height: 36px; 
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md);
    color: var(--text-muted); 
    cursor: pointer; 
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-btn:hover { 
    color: var(--text-primary); 
    transform: rotate(180deg); 
}

.preview-controls {
    display: flex; 
    flex-direction: column; 
    gap: 16px;
    background: var(--bg-card); 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); 
    padding: 20px;
    width: 100%; 
    max-width: 400px; 
    margin-bottom: 24px;
}

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

.control-label { 
    font-size: 0.75rem; 
    font-weight: 600; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    text-align: center; 
}

.segment-control {
    display: flex; 
    background: var(--bg-tertiary);
    padding: 4px; 
    border-radius: var(--radius-lg); 
    border: 1px solid var(--border-color);
}

.segment-btn {
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    padding: 10px 16px; 
    background: none; 
    border: none;
    color: var(--text-secondary); 
    font-size: 0.9rem; 
    font-weight: 500;
    border-radius: var(--radius-md); 
    cursor: pointer; 
    transition: var(--transition);
}

.segment-btn:hover { 
    background: var(--bg-hover); 
    color: var(--text-primary); 
}

.segment-btn.active { 
    background: var(--text-primary); 
    color: var(--bg-primary); 
}

.shape-selector { 
    display: flex; 
    gap: 12px; 
    justify-content: center; 
}

.shape-option {
    width: 48px; 
    height: 48px; 
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md);
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    transition: var(--transition);
    padding: 0;
}

.shape-option:hover { 
    border-color: var(--text-secondary); 
}

.shape-option.active { 
    border-color: var(--text-primary); 
    background: var(--bg-active); 
}

.shape-preview { 
    width: 24px; 
    height: 24px; 
    background: var(--text-secondary); 
    transition: var(--transition); 
}

.shape-option.active .shape-preview { 
    background: var(--text-primary); 
}

.shape-preview.square { 
    border-radius: 4px; 
}

.shape-preview.rounded { 
    border-radius: 6px; 
}

.shape-preview.squircle { 
    border-radius: 30%; 
}

.shape-preview.circle { 
    border-radius: 50%; 
}

.preview-container { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 20px 0; 
    min-height: 480px;
    width: 100%;
}

.preview-hint { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    text-align: center; 
    max-width: 300px; 
}

.phone-frame {
    width: 280px; 
    aspect-ratio: 9/19.5;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 40px; 
    padding: 10px;
    box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,0.1);
    transition: var(--transition);
}

.phone-frame:hover { 
    transform: translateY(-4px); 
}

.phone-frame.hidden { 
    display: none; 
}

.phone-screen {
    width: 100%; 
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    border-radius: 32px; 
    overflow: hidden; 
    position: relative;
}

.phone-screen.themed { 
    background: #1a1a1a !important; 
}

.phone-notch {
    position: absolute; 
    top: 0; 
    left: 50%; 
    transform: translateX(-50%);
    width: 100px; 
    height: 28px; 
    background: #1a1a1a;
    border-bottom-left-radius: 16px; 
    border-bottom-right-radius: 16px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 10;
}

.notch-speaker { 
    width: 50px; 
    height: 4px; 
    background: #333; 
    border-radius: 2px; 
    margin-top: 4px; 
}

.status-bar {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 8px 20px; 
    padding-top: 32px;
    font-size: 12px; 
    font-weight: 600; 
    color: rgba(255,255,255,0.9);
}

.status-icons { 
    display: flex; 
    gap: 4px; 
}

.status-icons .material-symbols-rounded { 
    font-size: 14px; 
}

.home-content { 
    padding: 12px 16px; 
}

.clock-widget { 
    text-align: center; 
    margin-bottom: 20px; 
    margin-top: 8px; 
}

.clock-time { 
    font-size: 3.5rem; 
    font-weight: 200; 
    letter-spacing: -2px; 
    line-height: 1; 
}

.clock-date { 
    font-size: 0.85rem; 
    color: rgba(255,255,255,0.6); 
    margin-top: 4px; 
}

.phone-screen.themed .clock-time, 
.phone-screen.themed .clock-date { 
    color: #fff; 
}

.app-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 14px 10px; 
    padding: 8px 4px; 
}

.app-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 4px; 
}

.app-icon {
    width: 48px; 
    height: 48px; 
    border-radius: 12px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: #fff; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    overflow: hidden; 
    position: relative; 
    transition: transform 0.2s, border-radius 0.2s;
}

.app-icon:hover { 
    transform: scale(1.1); 
}

.app-icon.square { 
    border-radius: 4px; 
}

.app-icon.rounded { 
    border-radius: 12px; 
}

.app-icon.squircle { 
    border-radius: 24%; 
}

.app-icon.circle { 
    border-radius: 50%; 
}

.app-icon img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.app-icon .icon-color { 
    display: block; 
}

.app-icon .icon-mono { 
    display: none; 
}

.phone-screen.themed .app-icon .icon-color { 
    display: none; 
}

.phone-screen.themed .app-icon .icon-mono { 
    display: block; 
}

.phone-screen.themed .app-icon { 
    background: #333 !important; 
    box-shadow: none; 
    border: 1px solid rgba(255,255,255,0.1); 
}

.app-label { 
    font-size: 10px; 
    color: rgba(255,255,255,0.85); 
    text-align: center; 
    max-width: 52px; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

.phone-screen.themed .app-label { 
    color: rgba(255,255,255,0.7); 
}

.app-icon.user-icon { 
    background: var(--bg-tertiary); 
}

.app-icon.user-icon canvas { 
    width: 100%; 
    height: 100%; 
}

.phone-dock {
    position: absolute; 
    bottom: 24px; 
    left: 50%; 
    transform: translateX(-50%);
    display: flex; 
    gap: 14px; 
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 16px; 
    border-radius: 24px;
}

.dock-icon {
    width: 44px; 
    height: 44px; 
    border-radius: 12px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: #fff; 
    overflow: hidden; 
    transition: transform 0.2s, border-radius 0.2s;
}

.dock-icon:hover { 
    transform: scale(1.1); 
}

.dock-icon.square {
    border-radius: 4px;
}

.dock-icon.rounded {
    border-radius: 12px;
}

.dock-icon.squircle {
    border-radius: 24%;
}

.dock-icon.circle {
    border-radius: 50%;
}

.dock-icon img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.dock-icon .icon-color { 
    display: block; 
}

.dock-icon .icon-mono { 
    display: none; 
}

.phone-screen.themed .dock-icon .icon-color { 
    display: none; 
}

.phone-screen.themed .dock-icon .icon-mono { 
    display: block; 
}

.phone-screen.themed .phone-dock { 
    background: rgba(51,51,51,0.8); 
}

.phone-screen.themed .dock-icon { 
    background: #333 !important; 
    border: 1px solid rgba(255,255,255,0.1); 
}

.home-indicator { 
    position: absolute; 
    bottom: 8px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100px; 
    height: 4px; 
    background: rgba(255,255,255,0.3); 
    border-radius: 2px; 
}

.tv-frame {
    width: 100%;
    max-width: 640px; 
    aspect-ratio: 16/9;
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border-radius: 12px; 
    padding: 8px;
    box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,0.05);
    transition: var(--transition);
}

.tv-frame:hover { 
    transform: translateY(-4px); 
}

.tv-frame.hidden { 
    display: none; 
}

.tv-screen {
    width: 100%; 
    height: 100%;
    background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%);
    border-radius: 6px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
}

.tv-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.tv-nav {
    display: flex;
    gap: 8px;
}

.tv-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tv-nav-item .material-symbols-rounded {
    font-size: 18px;
}

.tv-nav-item:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
}

.tv-nav-item.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.tv-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tv-time {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

.tv-settings-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.tv-settings-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.tv-settings-btn .material-symbols-rounded {
    font-size: 20px;
}

.tv-content {
    flex: 1;
    padding: 16px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tv-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tv-section-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tv-banner-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

.tv-banner-row::-webkit-scrollbar {
    height: 4px;
}

.tv-banner-row::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.tv-banner-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.2s ease;
}

.tv-banner-card:hover {
    transform: scale(1.02);
}

.tv-banner-card:focus {
    outline: none;
}

.tv-banner-card:focus .tv-banner-image {
    box-shadow: 0 0 0 3px #fff;
}

.tv-banner-image {
    width: 160px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: box-shadow 0.2s ease;
}

.tv-banner-image img,
.tv-banner-image canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tv-banner-name {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.tv-banner-card.user-banner .tv-banner-image {
    width: 180px;
    height: 101px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 0 2px rgba(255,255,255,0.1);
}

.tv-banner-card.user-banner .tv-banner-name {
    max-width: 180px;
    font-weight: 600;
    color: #fff;
}

.tv-footer {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 12px 24px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.tv-footer .tv-nav-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.tv-footer .tv-nav-hint .material-symbols-rounded {
    font-size: 14px;
}

.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
}

.stat-card { 
    background: var(--bg-tertiary); 
    border-radius: var(--radius-lg); 
    padding: 20px; 
    text-align: center; 
    border: 1px solid var(--border-color); 
}

.stat-value { 
    font-size: 2rem; 
    font-weight: 700; 
    line-height: 1; 
}

.stat-label { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    margin-top: 6px; 
}

.export-options { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

.export-option {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 16px; 
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg); 
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.export-option:hover { 
    border-color: var(--border-light); 
}

.export-option-info { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
}

.export-option-icon {
    width: 40px; 
    height: 40px; 
    border-radius: var(--radius-md);
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: rgba(255,255,255,0.05); 
    color: var(--text-secondary);
    flex-shrink: 0;
}

.export-option-icon.android { color: var(--android-color); }
.export-option-icon.ios { color: var(--ios-color); }
.export-option-icon.web { color: var(--web-color); }
.export-option-icon.tv { color: var(--tv-color); }
.export-option-icon.store { color: var(--store-color); }

.export-option-text { 
    display: flex; 
    flex-direction: column; 
    gap: 2px; 
}

.export-option-title { 
    font-size: 0.95rem; 
    font-weight: 600; 
}

.export-option-subtitle { 
    font-size: 0.8rem; 
    color: var(--text-muted); 
}

.file-tree {
    background: var(--bg-tertiary); 
    border-radius: var(--radius-lg);
    padding: 16px; 
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; 
    font-size: 0.8rem;
    border: 1px solid var(--border-color); 
    max-height: 200px; 
    overflow-y: auto;
}

.file-item { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 4px 0; 
    color: var(--text-secondary); 
}

.file-item .material-symbols-rounded { font-size: 1rem; }
.file-item.folder .material-symbols-rounded { color: #fbbf24; }
.file-item.file .material-symbols-rounded { color: #60a5fa; }
.file-item.indent-1 { padding-left: 20px; }

.download-btn {
    width: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 12px;
    padding: 16px 24px; 
    background: linear-gradient(135deg, #fff, #e0e0e0);
    color: #000; 
    border: none; 
    border-radius: var(--radius-xl);
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255,255,255,0.2); 
    transition: var(--transition);
}

.download-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 30px rgba(255,255,255,0.3); 
}

.download-btn:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
    transform: none; 
}

.download-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--info), 0 4px 20px rgba(255,255,255,0.2);
}

.progress-bar { 
    width: 100%; 
    height: 4px; 
    background: var(--bg-tertiary); 
    border-radius: 2px; 
    margin-top: 12px; 
    overflow: hidden; 
}

.progress-fill { 
    height: 100%; 
    background: linear-gradient(90deg, var(--success), #00cc66); 
    width: 0%; 
    transition: width 0.3s; 
}

.code-section { 
    background: var(--bg-tertiary); 
    border-radius: var(--radius-lg); 
    border: 1px solid var(--border-color); 
    overflow: hidden; 
    margin-bottom: 12px; 
}

.code-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 16px; 
    background: rgba(0,0,0,0.3); 
    border-bottom: 1px solid var(--border-color); 
}

.code-title { 
    font-size: 0.9rem; 
    color: var(--text-secondary); 
}

.copy-btn { 
    width: 36px; 
    height: 36px; 
    background: none; 
    border: none; 
    border-radius: var(--radius-sm); 
    color: var(--text-muted); 
    cursor: pointer; 
    transition: var(--transition); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.copy-btn:hover { 
    background: var(--bg-hover); 
    color: var(--text-primary); 
}

.copy-btn.copied { 
    color: var(--success); 
}

.code-block { 
    padding: 16px; 
    overflow-x: auto; 
}

.code-block pre { 
    margin: 0; 
}

.code-block code { 
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; 
    font-size: 0.85rem; 
    line-height: 1.6; 
    color: var(--text-secondary); 
}

.code-dynamic { 
    color: var(--info); 
    font-weight: 600; 
}

.mobile-nav {
    display: none; 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    z-index: 100;
    background: var(--bg-card-solid); 
    border-top: 1px solid var(--border-color);
    padding: 8px; 
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.mobile-nav-item {
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 2px;
    padding: 8px; 
    background: none; 
    border: none;
    color: var(--text-muted); 
    font-size: 0.65rem; 
    font-weight: 500;
    border-radius: var(--radius-sm); 
    cursor: pointer; 
    transition: var(--transition);
}

.mobile-nav-item .material-symbols-rounded { 
    font-size: 22px; 
}

.mobile-nav-item.active { 
    color: var(--text-primary); 
    background: var(--bg-hover); 
}

.toast {
    position: fixed; 
    bottom: 40px; 
    left: 50%; 
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card-solid); 
    border: 1px solid var(--border-light);
    padding: 16px 24px; 
    border-radius: var(--radius-xl);
    display: flex; 
    align-items: center; 
    gap: 12px;
    box-shadow: var(--shadow-lg); 
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0; 
    pointer-events: none;
}

.toast.show { 
    transform: translateX(-50%) translateY(0); 
    opacity: 1; 
    pointer-events: auto; 
}

.toast.success #toastIcon { color: var(--success); }
.toast.error #toastIcon { color: var(--error); }

@keyframes spin { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

.spinning { 
    animation: spin 1s linear infinite; 
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinning { animation: none; }
    .phone-frame:hover,
    .tv-frame:hover,
    .download-btn:hover { transform: none; }
}

@media (forced-colors: active) {
    .toggle-slider { border: 2px solid CanvasText; }
    .toggle-slider::before { background: CanvasText; }
    .toggle-switch input:checked + .toggle-slider { background: Highlight; }
    .color-preset,
    .shape-option,
    .lang-option { border: 2px solid CanvasText; }
    .color-preset.active,
    .shape-option.active,
    .lang-option.active { border-color: Highlight; }
}

@media (max-width: 768px) {
    .header { padding: 12px 16px; height: 56px; }
    .logo-text { display: none; }
    .lang-btn { display: none; }
    .mobile-lang-btn { display: flex; }
    .desktop-nav { display: none; }
    .mobile-nav { display: flex; }
    
    .main-container { 
        padding: 16px; 
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); 
        min-height: calc(100dvh - 56px); 
        gap: 16px; 
    }
    
    .panel { padding: 20px; border-radius: var(--radius-lg); }
    .preview-panel .panel-header { padding: 16px; }
    .preview-controls { padding: 16px; max-width: 100%; }
    
    .preview-container { 
        min-height: auto; 
        padding: 12px 0;
        width: 100%;
        overflow: hidden;
    }
    
    .phone-frame { 
        width: 260px; 
        max-width: 100%;
        border-radius: 36px; 
        padding: 8px; 
    }
    
    .phone-screen { border-radius: 28px; }
    .phone-notch { width: 80px; height: 24px; }
    .app-grid { gap: 12px 8px; }
    .app-icon { width: 44px; height: 44px; }
    .app-label { font-size: 9px; max-width: 48px; }
    .dock-icon { width: 40px; height: 40px; }
    .phone-dock { padding: 8px 14px; gap: 12px; }
    .clock-time { font-size: 3rem; }
    
    .tv-frame {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 16/9;
        border-radius: 8px;
        padding: 6px;
    }
    
    .tv-screen {
        border-radius: 4px;
    }
    
    .tv-header { 
        padding: 8px 12px; 
    }
    
    .tv-nav {
        gap: 4px;
    }
    
    .tv-nav-item { 
        padding: 6px 8px; 
        font-size: 10px; 
    }
    
    .tv-nav-item span:not(.material-symbols-rounded) { 
        display: none; 
    }
    
    .tv-nav-item .material-symbols-rounded { 
        font-size: 16px; 
    }
    
    .tv-header-right {
        gap: 8px;
    }
    
    .tv-time {
        font-size: 11px;
    }
    
    .tv-settings-btn {
        width: 28px;
        height: 28px;
    }
    
    .tv-settings-btn .material-symbols-rounded {
        font-size: 16px;
    }
    
    .tv-content { 
        padding: 8px 12px; 
        gap: 12px; 
    }
    
    .tv-section {
        gap: 8px;
    }
    
    .tv-section-title { 
        font-size: 10px; 
    }
    
    .tv-banner-row { 
        gap: 10px; 
    }
    
    .tv-banner-image { 
        width: 100px; 
        height: 56px; 
        border-radius: 4px; 
    }
    
    .tv-banner-name { 
        font-size: 9px; 
        max-width: 100px; 
    }
    
    .tv-banner-card.user-banner .tv-banner-image { 
        width: 120px; 
        height: 68px; 
    }
    
    .tv-banner-card.user-banner .tv-banner-name { 
        max-width: 120px; 
    }
    
    .tv-footer { 
        padding: 6px 12px; 
        gap: 16px; 
    }
    
    .tv-footer .tv-nav-hint {
        font-size: 9px;
        gap: 4px;
    }
    
    .tv-footer .tv-nav-hint .material-symbols-rounded {
        font-size: 12px;
    }
    
    .lang-modal-content { padding: 20px; }
    .lang-options { grid-template-columns: 1fr; }
    
    .toast { 
        left: 16px; 
        right: 16px; 
        transform: translateX(0) translateY(100px); 
        bottom: calc(80px + env(safe-area-inset-bottom, 0px)); 
    }
    .toast.show { transform: translateX(0) translateY(0); }
}

@media (max-width: 480px) {
    .tv-frame {
        border-radius: 6px;
        padding: 4px;
    }
    
    .tv-header {
        padding: 6px 10px;
    }
    
    .tv-nav-item {
        padding: 4px 6px;
    }
    
    .tv-nav-item .material-symbols-rounded {
        font-size: 14px;
    }
    
    .tv-settings-btn {
        width: 24px;
        height: 24px;
    }
    
    .tv-settings-btn .material-symbols-rounded {
        font-size: 14px;
    }
    
    .tv-time {
        font-size: 10px;
    }
    
    .tv-content {
        padding: 6px 10px;
        gap: 10px;
    }
    
    .tv-section-title {
        font-size: 9px;
    }
    
    .tv-banner-row {
        gap: 8px;
    }
    
    .tv-banner-image {
        width: 80px;
        height: 45px;
        border-radius: 3px;
    }
    
    .tv-banner-name {
        font-size: 8px;
        max-width: 80px;
    }
    
    .tv-banner-card.user-banner .tv-banner-image {
        width: 100px;
        height: 56px;
    }
    
    .tv-banner-card.user-banner .tv-banner-name {
        max-width: 100px;
        font-size: 9px;
    }
    
    .tv-footer {
        padding: 4px 10px;
        gap: 12px;
    }
    
    .tv-footer .tv-nav-hint {
        font-size: 8px;
    }
    
    .tv-footer .tv-nav-hint .material-symbols-rounded {
        font-size: 10px;
    }
}

@media (max-width: 380px) {
    .phone-frame { width: 240px; }
    .app-icon { width: 40px; height: 40px; }
    .dock-icon { width: 36px; height: 36px; }
    .clock-time { font-size: 2.5rem; }
    
    .tv-frame {
        border-radius: 4px;
        padding: 3px;
    }
    
    .tv-banner-image {
        width: 70px;
        height: 39px;
    }
    
    .tv-banner-name {
        font-size: 7px;
        max-width: 70px;
    }
    
    .tv-banner-card.user-banner .tv-banner-image {
        width: 85px;
        height: 48px;
    }
    
    .tv-banner-card.user-banner .tv-banner-name {
        max-width: 85px;
        font-size: 8px;
    }
}

.hidden { 
    display: none !important; 
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}