:root {
    --bg-color: #050505;
    --text-main: #f5f5f5;
    --text-muted: #a3a3a3;
    --accent: #ffffff;
    --surface: #111111;
    --surface-hover: #1f1f1f;
    --border: #222222;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Layout */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}
.logo span {
    color: var(--text-muted);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.nav a:hover {
    color: var(--text-muted);
}

.main-content {
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.section {
    width: 100%;
    max-width: 1200px;
    padding: 4rem 5%;
    display: none;
    animation: fadeIn 0.8s ease forwards;
}
.section.active {
    display: flex;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-color);
}
.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: var(--surface-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--text-main);
}

/* Hero */
#hero {
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
}
.hero-content {
    flex: 1;
    padding-right: 2rem;
}
.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}
.hero-title span {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 300;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}
.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 600px;
}
.image-wrapper {
    position: absolute;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.image-wrapper:hover img {
    transform: scale(1.05);
}
.main-img {
    width: 80%;
    height: 90%;
    right: 0;
    top: 5%;
    z-index: 1;
}
.sub-img {
    width: 50%;
    height: 50%;
    left: -10%;
    bottom: 10%;
    z-index: 2;
    border: 4px solid var(--bg-color);
}

/* Quiz Section */
#quiz-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}
.quiz-wrapper {
    background-color: var(--surface);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 600px;
}
.quiz-header {
    margin-bottom: 2rem;
}
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border);
    border-radius: 2px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background-color: var(--accent);
    width: 33.33%;
    transition: width 0.4s ease;
}
.step-indicator {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.quiz-step {
    display: none;
    animation: fadeIn 0.4s ease;
}
.quiz-step.active {
    display: block;
}
.quiz-step h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 500;
}
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.quiz-option {
    padding: 1.2rem;
    background-color: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-family: inherit;
}
.quiz-option:hover {
    border-color: var(--text-muted);
    background-color: var(--surface-hover);
}
.quiz-actions {
    margin-top: 2rem;
    display: none;
}
.quiz-actions.active {
    display: flex;
}

/* Loader */
#analyzing-container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    text-align: center;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}
#loading-text {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 500;
    animation: pulse 1.5s infinite;
}

/* Results */
#results-container {
    flex-direction: column;
}
.results-header {
    text-align: center;
    margin-bottom: 4rem;
}
.results-header h2 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.vibe-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.tag {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background-color: var(--surface);
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.looks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}
.look-card {
    background-color: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.look-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border-color: var(--text-muted);
}
.look-img {
    height: 400px;
    width: 100%;
    object-fit: cover;
}
.look-info {
    padding: 1.5rem;
}
.look-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.look-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer {
    width: 100%;
    padding: 3rem 5%;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Metrics Form Options */
.metrics-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.file-upload-zone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--surface);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.file-upload-zone:hover {
    border-color: var(--text-muted);
    background-color: var(--surface-hover);
}
.file-upload-zone.dragover {
    border-color: var(--accent);
    background-color: rgba(255, 255, 255, 0.05);
}
.upload-content {
    color: var(--text-muted);
    z-index: 2;
}
.image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    background-color: var(--bg-color);
}
.input-row {
    display: flex;
    gap: 1rem;
}
.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.input-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.input-field {
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}
.input-field:focus {
    border-color: var(--text-muted);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

/* User Upload Review */
.user-upload-review {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: -4rem auto 2rem;
    border: 4px solid var(--surface);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    display: block;
    position: relative;
    z-index: 2;
}

/* Utilities */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 900px) {
    #hero { flex-direction: column; text-align: center; padding-top: 2rem; }
    .hero-content { padding-right: 0; margin-bottom: 3rem; }
    .hero-title { font-size: 3rem; }
    .hero-subtitle { margin: 0 auto 2rem; }
    .hero-actions { justify-content: center; }
    .hero-visual { width: 100%; height: 400px; }
    .main-img { width: 90%; right: 5%; }
    .sub-img { display: none; }
}

@media (max-width: 600px) {
    .nav { display: none; } /* Simplified mobile header */
    .quiz-wrapper { padding: 1.5rem; border-radius: 0; border-left: none; border-right: none;}
    .quiz-step h2 { font-size: 1.5rem; }
    #quiz-container { align-items: stretch; padding: 0;}
    .input-row { flex-direction: column; /* Stack height/weight on mobile */ }
}
