/* =========================
   GLOBAL RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f2f4f8;
    padding: 20px;
}

/* =========================
   MAIN LAYOUT
========================= */

.container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* =========================
   BUILDER PANEL
========================= */

.builder {
    width: 35%;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.builder h2 {
    margin-bottom: 10px;
}

.builder h3 {
    margin-top: 15px;
    margin-bottom: 5px;
}

/* =========================
   INPUTS
========================= */

input,
textarea,
select {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

/* =========================
   BUTTON
========================= */

button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    margin-top: 10px;
    transition: 0.2s;
}

button:hover {
    background: #0056b3;
}

/* =========================
   PREVIEW PANEL
========================= */

.preview {
    width: 65%;
}

/* =========================
   CV WRAPPER
========================= */

#cv {
    background: white;
    padding: 30px;
    min-height: 900px;
    box-shadow: 0 0 15px rgba(0,0,0,.1);
    border-radius: 10px;
}

/* =========================
   PROFILE PREVIEW INPUT
========================= */

#profilePreview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 10px auto;
    border: 4px solid var(--theme);
    align-content: space-evenly;
}

/* =========================
   TEMPLATE SELECTOR
========================= */

.template-selector {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.template-card {
    flex: 1;
    border: 2px solid #ddd;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    border-radius: 10px;
    transition: 0.2s;
    background: white;
}

.template-card:hover {
    border-color: var(--theme);
    transform: scale(1.02);
}

.template-card.active {
    border-color: var(--theme);
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* =========================
   TEMPLATE THUMBNAILS
========================= */

.thumb {
    height: 60px;
    border-radius: 6px;
    margin-bottom: 5px;
}

/* mini previews */
.modern-thumb {
    background: linear-gradient(var(--theme), #fff);
}

.professional-thumb {
    background: #f5f5f5;
    border-left: 5px solid var(--theme);
}

.creative-thumb {
    background: linear-gradient(45deg, var(--theme), black);
}

/* =========================
   SCROLL FIX (IMPORTANT)
========================= */

html, body {
    height: 100%;
}

/* prevent layout shift during CV rendering */
.preview {
    overflow-x: hidden;
}