:root {
    --bg-dark: #0f172a; --card-bg: #1e293b; --primary: #ec4899; 
    --accent: #8b5cf6; --text-main: #f8fafc; --text-muted: #94a3b8; --border: #334155;
    --success: #22c55e;
}

body { font-family: 'Plus Jakarta Sans', sans-serif; background-color: var(--bg-dark); background-image: radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 20%); color: var(--text-main); margin: 0; padding: 20px; display: flex; flex-direction: column; align-items: center; min-height: 100vh; padding-bottom: 120px; }

nav { width: 100%; max-width: 900px; margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; }
.back-link { text-decoration: none; color: var(--text-muted); font-weight: 600; display: flex; gap: 8px; align-items: center; transition: 0.3s; }
.back-link:hover { color: white; transform: translateX(-5px); }
.brand-container { display: flex; align-items: center; gap: 10px; }
.brand-logo { font-weight: 800; font-size: 1.2rem; }
.gradient-text { background: linear-gradient(135deg, #818cf8 0%, #f472b6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tool-badge { background: rgba(236, 72, 153, 0.1); border: 1px solid var(--primary); color: var(--primary); padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; }

.container { width: 100%; max-width: 900px; display: flex; flex-direction: column; gap: 30px; }

.section-box { background: rgba(30, 41, 59, 0.6); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 24px; padding: 35px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
h2 { margin: 0 0 20px 0; font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }
.section-desc { color: var(--text-muted); margin-bottom: 25px; line-height: 1.5; }

label { display: block; color: var(--text-muted); font-size: 0.75rem; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 20px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip { background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-muted); padding: 8px 12px; border-radius: 50px; font-size: 0.85rem; cursor: pointer; transition: 0.2s; user-select: none; }
.chip:hover { border-color: var(--text-main); background: #253045; }
.chip.active { background: var(--primary); color: white; border-color: var(--primary); }

input[type="range"] { width: 100%; accent-color: var(--primary); cursor: pointer; height: 6px; background: var(--border); border-radius: 5px; appearance: none; }
.range-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: white; font-weight: bold; margin-top: 10px; }

.generate-btn {
    background: linear-gradient(135deg, #ec4899, #8b5cf6); color: white; border: none; width: 100%; padding: 18px; font-weight: 700; border-radius: 16px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; box-shadow: 0 10px 20px rgba(236, 72, 153, 0.2); transition: 0.3s; font-size: 1.1rem; margin-top: 30px;
}
.generate-btn:hover { transform: translateY(-2px); box-shadow: 0 15px 40px rgba(236, 72, 153, 0.4); }
.generate-btn:disabled { opacity: 0.5; cursor: wait; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.category-card {
    background: var(--bg-dark); border: 2px dashed var(--border); border-radius: 20px; padding: 25px;
    cursor: pointer; transition: 0.3s; position: relative; text-align: center; display: flex; flex-direction: column; align-items: center;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-5px); background: rgba(236, 72, 153, 0.05); }
.category-card.selected-card { border-color: var(--success); background: rgba(34, 197, 94, 0.1); border-style: solid; }

.select-circle {
    position: absolute; top: 15px; right: 15px; width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--text-muted); transition: 0.2s; display: flex; align-items: center; justify-content: center;
}
.category-card.selected-card .select-circle { background: var(--success); border-color: var(--success); color: white; }
.select-circle::after { content: '✓'; font-size: 14px; display: none; }
.category-card.selected-card .select-circle::after { display: block; }

.cat-emoji { font-size: 2.5rem; margin-bottom: 10px; }
.cat-title { font-weight: 700; color: white; margin-bottom: 5px; }
.cat-btn { font-size: 0.8rem; color: var(--primary); margin-top: 10px; text-decoration: underline; background: none; border: none; cursor: pointer; }

.bottom-bar {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(150px);
    background: #1e293b; border: 1px solid var(--success); padding: 15px 30px; border-radius: 50px;
    display: flex; align-items: center; gap: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 100; min-width: 300px; justify-content: space-between;
}
.bottom-bar.visible { transform: translateX(-50%) translateY(0); }
.bar-btn { background: var(--success); color: white; border: none; padding: 10px 25px; border-radius: 30px; font-weight: 700; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.bar-btn:hover { background: #16a34a; transform: scale(1.05); }

/* MODAL */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; display: none; justify-content: center; align-items: flex-start; padding: 20px; backdrop-filter: blur(8px); overflow-y: auto; }
.modal-content { background: var(--card-bg); border: 1px solid var(--border); width: 100%; max-width: 700px; border-radius: 24px; padding: 30px; position: relative; margin-top: 40px; margin-bottom: 40px; }
.close-btn { position: absolute; top: 20px; right: 20px; background: #334155; border: none; color: white; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; }

.modal-title-area { margin-bottom: 25px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.modal-title { font-size: 1.5rem; font-weight: 800; color: white; }

/* ID CARD */
.id-card { background: var(--bg-dark); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 20px; display: grid; grid-template-columns: 70px 1fr; gap: 20px; align-items: start; }
.id-emoji { font-size: 2.5rem; background: rgba(255,255,255,0.05); width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

.id-info { width: 100%; }
.id-header { border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.id-name { font-size: 1.2rem; font-weight: 700; color: white; }
.id-role { color: var(--primary); font-size: 0.9rem; font-weight: 600; }

.id-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; }

.data-point { display: flex; flex-direction: column; }
.dp-label { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.dp-value { font-size: 0.9rem; color: #f1f5f9; font-weight: 500; }

@media(max-width: 600px) { .id-card { grid-template-columns: 1fr; text-align: center; } .id-emoji { margin: 0 auto; } .id-grid { text-align: left; } }

.loader { width: 24px; height: 24px; border: 3px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }