:root {
    --bg-dark: #070708;
    --sidebar-bg: #111113;
    --accent: #3b82f6;
    --border: #222225;
    --text: #f1f5f9;
    --text-dim: #64748b;
    --device-frame: #1a1a1c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 380px;
    background: var(--sidebar-bg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-right: 1px solid var(--border);
    z-index: 100;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

/* Mobile Adjustments for Sidebar */
@media (max-width: 768px) {
    body { flex-direction: column; overflow: auto; height: auto; }
    .sidebar { 
        width: 100%; 
        height: auto; 
        border-right: none; 
        border-bottom: 1px solid var(--border);
        padding: 16px;
    }
    .viewer { min-height: 600px; height: 80vh; }
}

.header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.3rem;
    color: white;
}

.header-subtitle {
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 8px;
    display: block;
    font-weight: 700;
}

.row { display: flex; gap: 10px; align-items: center; margin-bottom: 5px; }
.row > * { flex: 1; }

textarea {
    flex: 1;
    min-height: 200px;
    resize: vertical;
    background: #000;
    color: #4ade80;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.6;
    outline: none;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

button, select, input {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #1e1e21;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

button:hover { background: #2a2a2e; border-color: #3f3f46; transform: translateY(-1px); }
button.primary { background: var(--accent); color: white; border: none; font-weight: 600; }
button.primary:hover { background: #2563eb; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }

/* Zoom Control in Sidebar */
.sidebar-zoom {
    background: #1a1a1d;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border);
}

.zoom-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.zoom-slider-container input { flex: 1; padding: 0; cursor: pointer; }
.zoom-val-text { font-size: 12px; font-weight: 700; color: var(--accent); min-width: 35px; }

/* Developer Info Section */
.dev-card {
    background: #1a1a1d;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--border);
}

.dev-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.dev-links a {
    text-decoration: none;
    font-size: 10px;
    color: white;
    background: #26262b;
    padding: 6px;
    border-radius: 6px;
    text-align: center;
    transition: background 0.2s;
}

.dev-links a:hover { background: var(--accent); }

/* Viewer Area */
.viewer {
    flex: 1;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.05) 0%, transparent 40%),
        #0a0a0c;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
}

/* DEVICE MOCKUP STYLES */
.device-container {
    position: relative;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
}

.device-frame {
    position: relative;
    width: 400px;
    height: 840px;
    background: var(--device-frame);
    border-radius: 56px;
    padding: 10px;
    box-shadow: 
        0 0 0 2px #333,
        0 0 0 4px #111,
        0 30px 100px rgba(0,0,0,0.9);
    transition: width 0.5s, height 0.5s, border-radius 0.5s, background 0.3s;
}

.screen-glass {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 46px;
    overflow: hidden;
}

.camera-cutout {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    z-index: 30;
    transition: all 0.4s ease;
}

.cutout-island { width: 110px; height: 32px; border-radius: 20px; }
.cutout-hole { width: 12px; height: 12px; border-radius: 50%; top: 12px; }

.status-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40px;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    z-index: 20;
    pointer-events: none;
}

.btn-side { position: absolute; background: linear-gradient(to bottom, #333, #111); border-radius: 2px; z-index: 1; border: 1px solid #444; }

.iframe-wrapper {
    width: 100%;
    height: 100%;
    background: #fff;
}

iframe { width: 100%; height: 100%; border: none; }

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

.modal-content {
    background: var(--sidebar-bg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid var(--border);
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 20px;
}

.footer-nav {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 15px;
    justify-content: center;
}

.footer-nav span {
    font-size: 11px;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s;
}

.footer-nav span:hover { color: var(--accent); }