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

:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --accent-primary: #7c3aed;
    --accent-secondary: #06b6d4;
    --accent-glow: rgba(124, 58, 237, 0.4);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 60%),
        linear-gradient(135deg, #0f0f23 0%, #1a1a3e 25%, #0d1b2a 50%, #1a1a3e 75%, #0f0f23 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -2;
}

/* Floating orbs */
body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: floatOrb 20s ease-in-out infinite;
    z-index: -1;
    filter: blur(40px);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, 50px) scale(1.1); }
    66% { transform: translate(30px, -30px) scale(0.95); }
}

/* Noise texture overlay */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: -1;
}

.container {
    display: flex;
    gap: 50px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

/* iPhone Frame - iPhone 14 Pro dimensions */
.iphone-frame {
    width: 393px;
    height: 852px;
    background: linear-gradient(145deg, #1a1a1a 0%, #000 100%);
    border-radius: 55px;
    padding: 0;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 0 4px #0a0a0a,
        0 0 0 6px rgba(255, 255, 255, 0.05),
        0 30px 100px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(124, 58, 237, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-2deg);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.iphone-frame:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* Glossy reflection on frame */
.iphone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 50%;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    border-radius: 55px;
    pointer-events: none;
    z-index: 200;
}

/* Screen */
.screen {
    width: 100%;
    height: 100%;
    border-radius: 55px;
    position: relative;
    overflow: hidden;
}

/* Wallpaper Background - More vibrant */
.screen-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, 
            #5b6c8a 0%, 
            #4a5a72 20%,
            #3d4d62 40%,
            #354555 60%,
            #2d3d4d 80%,
            #253545 100%
        );
}

/* Animated light sweep on wallpaper */
.screen-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: lightSweep 8s ease-in-out infinite;
}

@keyframes lightSweep {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

/* Blur overlay when folder is open */
.screen-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 35, 50, 0.6);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 11px;
    left: 50%;
    transform: translateX(-50%);
    width: 126px;
    height: 37px;
    background: #000;
    border-radius: 23px;
    z-index: 100;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.dynamic-island:hover {
    width: 140px;
    height: 40px;
}

/* Status Bar */
.status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 17px 28px 0 28px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    height: 59px;
    z-index: 50;
    letter-spacing: -0.3px;
}

.status-left {
    font-feature-settings: 'tnum';
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-right {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Signal bars */
.signal-bars {
    display: flex;
    gap: 1.5px;
    align-items: flex-end;
    height: 12px;
    margin-right: 2px;
}

.signal-bar {
    width: 3px;
    background: white;
    border-radius: 1px;
}

.signal-bar:nth-child(1) { height: 4px; }
.signal-bar:nth-child(2) { height: 6px; }
.signal-bar:nth-child(3) { height: 8px; }
.signal-bar:nth-child(4) { height: 11px; }

/* WiFi icon */
.wifi-icon {
    width: 17px;
    height: 12px;
    margin-right: 2px;
}

/* Battery */
.battery {
    display: flex;
    align-items: center;
    gap: 1px;
}

.battery-body {
    width: 27px;
    height: 13px;
    border: 1.3px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    padding: 1.5px;
    position: relative;
}

.battery-level {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #34d399, #10b981);
    border-radius: 2px;
}

.battery-cap {
    width: 2px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 1px 1px 0;
    margin-left: 1px;
}

/* App Folder - Liquid Glass Effect */
.app-folder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12) 0%, 
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.08) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 36px;
    padding: 22px 18px 16px 18px;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(124, 58, 237, 0.1);
    animation: folderFloat 6s ease-in-out infinite;
}

/* Glass reflection */
.app-folder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    border-radius: 36px 36px 0 0;
    pointer-events: none;
}

/* Liquid edge glow */
.app-folder::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.3) 0%,
        transparent 30%,
        transparent 70%,
        rgba(6, 182, 212, 0.3) 100%
    );
    border-radius: 38px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-folder:hover::after {
    opacity: 1;
}

@keyframes folderFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-3px); }
}

/* Icons Grid */
.icons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
    padding: 0 4px;
    position: relative;
    z-index: 1;
}

.icon-slot {
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.icon-slot:hover {
    transform: scale(1.05);
}

.icon-slot:hover .icon-image {
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(124, 58, 237, 0.2);
}

.icon-slot:active .icon-image {
    transform: scale(0.92);
}

.icon-image {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

/* iOS icon mask shape with glass shine */
.icon-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        transparent 50%
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0.5;
}

.icon-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 3;
}

.icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.08) 0%, 
        rgba(255, 255, 255, 0.02) 100%
    );
    transition: background 0.2s ease;
}

.icon-slot:hover .icon-placeholder {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
}

.icon-placeholder span {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 200;
    transition: all 0.2s ease;
}

.icon-slot:hover .icon-placeholder span {
    color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.icon-image.has-icon {
    background: #fff;
}

.icon-label {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    line-height: 1.15;
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.1px;
    cursor: text;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.icon-label:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Inline label editing input */
.icon-label-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    padding: 3px 6px;
    outline: none;
    font-family: inherit;
    letter-spacing: -0.1px;
    box-shadow: 
        0 0 0 2px rgba(124, 58, 237, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.icon-label-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.icon-label-input::selection {
    background: rgba(124, 58, 237, 0.4);
}

/* Page Indicators */
.page-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 16px;
    position: relative;
    z-index: 1;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Dock - Liquid Glass */
.dock {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 18px;
    padding: 14px 18px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 30px;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 10px 40px rgba(0, 0, 0, 0.35);
}

/* Dock glass shine */
.dock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 100%
    );
    border-radius: 30px 30px 0 0;
    pointer-events: none;
}

.dock-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(200, 200, 200, 0.3) 0%, rgba(150, 150, 150, 0.15) 100%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.dock-icon:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Simulate blurred app icons in dock with gradients */
.dock-icon:nth-child(1) {
    background: linear-gradient(145deg, rgba(52, 211, 153, 0.6) 0%, rgba(16, 185, 129, 0.4) 100%);
}

.dock-icon:nth-child(2) {
    background: linear-gradient(145deg, rgba(52, 211, 153, 0.5) 0%, rgba(34, 197, 94, 0.4) 100%);
}

.dock-icon:nth-child(3) {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.6) 0%, rgba(37, 99, 235, 0.4) 100%);
}

.dock-icon:nth-child(4) {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.6) 0%, rgba(6, 182, 212, 0.4) 100%);
}

/* Glass shine on dock icons */
.dock-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 15px 15px 0 0;
    pointer-events: none;
}

/* Home Indicator */
.home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.home-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Controls Panel - Liquid Glass Card */
.controls-panel {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 28px;
    padding: 36px;
    max-width: 380px;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 25px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

/* Glass reflection */
.controls-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 100%
    );
    border-radius: 28px 28px 0 0;
    pointer-events: none;
}

/* Accent glow */
.controls-panel::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, 
        rgba(124, 58, 237, 0.1) 0%, 
        transparent 50%
    );
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite;
}

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

.controls-panel h2 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 26px;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.controls-panel p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.file-input-container {
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, 
        var(--accent-primary) 0%, 
        #8b5cf6 50%,
        var(--accent-secondary) 100%
    );
    background-size: 200% 200%;
    color: white;
    width: 100%;
    box-shadow: 
        0 8px 30px rgba(124, 58, 237, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    animation: gradientBtn 3s ease infinite;
}

@keyframes gradientBtn {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(124, 58, 237, 0.5),
        0 0 30px rgba(124, 58, 237, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.tips {
    background: linear-gradient(135deg, 
        rgba(124, 58, 237, 0.15) 0%, 
        rgba(6, 182, 212, 0.1) 100%
    );
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 18px;
    border-left: 4px solid var(--accent-primary);
    position: relative;
    z-index: 1;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.tips h3 {
    margin-bottom: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
}

.tips ul {
    list-style: none;
    color: var(--text-secondary);
    font-size: 14px;
}

.tips li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.tips li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
}

/* Modal - Liquid Glass */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 28px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 30px 100px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(124, 58, 237, 0.15);
    animation: modalSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

/* Glass reflection */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 100%
    );
    border-radius: 28px 28px 0 0;
    pointer-events: none;
    z-index: 0;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 28px;
    position: relative;
    z-index: 1;
}

.crop-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.crop-preview {
    width: 200px;
    height: 200px;
    border-radius: 17%;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    position: relative;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Shine overlay on preview */
.crop-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        transparent 100%
    );
    border-radius: 17% 17% 0 0;
    pointer-events: none;
    z-index: 10;
}

.crop-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: move;
    user-select: none;
    -webkit-user-drag: none;
}

.crop-controls {
    margin-top: 28px;
}

.control-group {
    margin-bottom: 24px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

#scaleValue {
    color: var(--accent-primary);
    font-weight: 700;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 15px rgba(124, 58, 237, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 
        0 0 0 10px rgba(124, 58, 237, 0.15),
        0 4px 20px rgba(124, 58, 237, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    cursor: pointer;
    border: none;
}

.control-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-footer {
    display: flex;
    gap: 14px;
    padding: 24px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.modal-footer .btn {
    flex: 1;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.3px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
}

.footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.footer a:hover {
    color: #fff;
}

.footer a:hover::after {
    transform: scaleX(1);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .iphone-frame {
        transform: scale(0.9) perspective(1000px) rotateY(0deg);
    }
    
    .iphone-frame:hover {
        transform: scale(0.9) perspective(1000px) rotateY(0deg);
    }
}

@media (max-width: 500px) {
    .iphone-frame {
        transform: scale(0.75) perspective(1000px) rotateY(0deg);
    }
    
    .iphone-frame:hover {
        transform: scale(0.75) perspective(1000px) rotateY(0deg);
    }
    
    .controls-panel {
        max-width: 100%;
        margin: 0 10px;
        padding: 28px;
    }
}

/* Selection styling */
::selection {
    background: rgba(124, 58, 237, 0.4);
    color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
