@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=swap');
        body { font-family: 'Quicksand', sans-serif; background: var(--ios-bg); color: var(--ios-text); }

        .biolink-container { 
            max-width: 1000px; 
            margin: 80px auto; 
            padding: 20px; 
            display: flex; 
            flex-direction: row; 
            gap: 30px; 
            align-items: flex-start; 
        }
        @media (max-width: 992px) { 
            .biolink-container { flex-direction: column; margin-top: 60px; align-items: stretch; } 
            .preview-section { position: relative; top: 0; width: 100%; order: 1; margin-top: 40px; }
            .phone-mockup { width: 100%; max-width: 320px; margin: 0 auto; height: 580px; }
        }
        .editor-section { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
        .preview-section { flex: 0 0 auto; position: sticky; top: 100px; height: fit-content; display: flex; flex-direction: column; align-items: center; }
        .phone-mockup { width: 320px; height: 640px; border: 12px solid #333; border-radius: 40px; overflow: hidden; background: white; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
        .preview-content { 
            height: 100%; 
            overflow: hidden; 
            padding: 20px; 
            display: flex; 
            flex-direction: column; 
            align-items: center; 
            text-align: center; 
            background-size: cover; 
            background-position: center; 
            background-repeat: no-repeat;
            position: relative;
            /* One Page Fixed Screen / Non-Scrollable Mobile Lock */
            overscroll-behavior: none;
        }
        .preview-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 2; }
        .preview-name { font-weight: 700; font-size: 1.2rem; margin-bottom: 5px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); z-index: 2; }
        .preview-bio { font-size: 0.9rem; opacity: 0.9; margin-bottom: 20px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); z-index: 2; }
        .preview-links { width: 100%; display: flex; flex-direction: column; gap: 10px; z-index: 2; overflow-y: auto; max-height: calc(100% - 250px); touch-action: pan-y; }
        .preview-link-item { padding: 12px; border-radius: 12px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; text-align: center; backdrop-filter: blur(5px); }

        /* Templates Responsiveness Fix */
        @media (max-width: 600px) {
            .preview-content { padding: 30px 15px; }
            .preview-name { font-size: 1.1rem; }
            .preview-bio { font-size: 0.85rem; }
            .preview-link-item { padding: 10px; font-size: 0.9rem; }
        }
        
        /* Templates */
        /* Template 1: Modern Gradient */
        .template-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; color: white !important; border-radius: 0 !important; }
        .template-1 .preview-link-item { background: rgba(255, 255, 255, 0.2) !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; color: white !important; border-radius: 25px !important; }
        
        /* Template 2: Minimalist Clean */
        .template-2 { background: #ffffff !important; color: #1a1a1a !important; }
        .template-2 .preview-avatar { border: 2px solid #1a1a1a !important; box-shadow: 4px 4px 0px #1a1a1a !important; }
        .template-2 .preview-name, .template-2 .preview-bio { text-shadow: none !important; }
        .template-2 .preview-link-item { background: #1a1a1a !important; color: white !important; border-radius: 4px !important; border: 2px solid #1a1a1a !important; box-shadow: 4px 4px 0px rgba(0,0,0,0.1) !important; }
        
        /* Template 3: Glassmorphism */
        .template-3 { background: linear-gradient(45deg, #00dbde 0%, #fc00ff 100%) !important; color: #fff !important; }
        .template-3::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.2) !important; z-index: 1; }
        .template-3 .preview-link-item { background: rgba(255, 255, 255, 0.1) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; backdrop-filter: blur(15px) !important; color: white !important; border-radius: 15px !important; }

        .form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 15px; }
        .form-group label { font-weight: 700; font-size: 14px; }
        .form-group input, .form-group textarea, .form-group select { padding: 12px; border-radius: 12px; border: 1px solid var(--ios-border); background: var(--ios-card); color: var(--ios-text); }
        
        .template-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
        .template-btn { padding: 12px; border: 2px solid var(--ios-border); border-radius: 12px; cursor: pointer; text-align: center; font-weight: 700; transition: all 0.3s; background: var(--ios-card); color: var(--ios-text); }
        
        .template-btn.active { border-color: var(--ios-primary); background: rgba(10,132,255,0.1); }
        .ios-card { width: 100%; overflow: hidden; }
        .form-group input, .form-group textarea, .form-group select { width: 100%; }

        /* Color Controls */
        .color-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 10px; }
        .color-input-wrapper { display: flex; flex-direction: column; gap: 5px; }
        .color-input-wrapper label { font-size: 12px; opacity: 0.8; }
        .color-picker-row { display: flex; align-items: center; gap: 10px; background: var(--ios-card); padding: 8px; border-radius: 10px; border: 1px solid var(--ios-border); }
        .color-picker-row input[type="color"] { width: 30px; height: 30px; padding: 0; border: none; background: none; cursor: pointer; }
        .color-picker-row span { font-family: monospace; font-size: 12px; }
        
        .custom-html-area { font-family: monospace; height: 100px; resize: vertical; width: 100%; }
        .copyright-tag { margin-top: auto; padding: 20px 0; font-size: 12px; opacity: 0.8; }
        .copyright-tag a { color: inherit; text-decoration: none; font-weight: 700; }

        /* Dynamic Links Editor */
        .links-editor { display: flex; flex-direction: column; gap: 10px; }
        .link-row { display: flex; gap: 10px; align-items: center; background: var(--ios-card); padding: 10px; border-radius: 12px; border: 1px solid var(--ios-border); flex-wrap: wrap; }
        .link-row input { flex: 1; min-width: 120px; padding: 8px !important; }
        .link-action-btn { width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; }
        .add-link-btn { background: #34c759; color: white; margin-top: 10px; width: 100%; padding: 12px; border-radius: 12px; border: none; font-weight: 700; cursor: pointer; }
        .remove-link-btn { background: #ff3b30; color: white; }
