:root {
    --primary-color: #8b5cf6; 
    --primary-hover: #7c3aed;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --star-color: #fbbf24;
    --star-inactive: #334155;
    --bg-gray: #0f172a;
    --border-color: #334155;
    --whatsapp-color: #25D366;
    --radius: 16px;
    --font-family: 'Poppins', sans-serif;
    --input-bg: #0f172a;
}

.global-back-btn { position: absolute; top: 20px; left: 20px; color: #94a3b8; text-decoration: none; font-size: 15px; z-index: 9999; display: flex; align-items: center; gap: 6px; font-weight: 500; transition: color 0.2s; }
.global-back-btn:hover { color: #f8fafc; }

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

body {
    font-family: var(--font-family);
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
    background-color: #09090b;
}

.magic-main-title {
    text-align: center;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-family: var(--font-family);
    width: 100%;
    max-width: 480px;
}
.magic-main-title .sparkle-icon {
    color: #c084fc; 
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.6));
}
.magic-main-title span {
    background: linear-gradient(to right, #e879f9, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.page-background {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    /* Soft blurred colorful gradient mimicking ezyreview background */
    background: radial-gradient(circle at 15% 50%, rgba(253, 224, 71, 0.4), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(134, 239, 172, 0.3), transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(244, 114, 182, 0.2), transparent 50%);
    filter: blur(40px);
}

.page-wrapper {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
}

.top-logo-section {
    margin-bottom: 1rem;
    z-index: 10;
}

.circular-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: #fff;
    border: 3px solid #fff;
}

.review-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    width: 100%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}
.review-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 15px rgba(139, 92, 246, 0.15);
}

h1#display-company-name {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

p#display-company-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Stars */
.stars-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    cursor: pointer;
}

.star {
    font-size: 3rem;
    color: var(--star-inactive);
    transition: transform 0.2s;
    line-height: 1;
}

.star.active { color: var(--star-color); }
.star:hover { transform: scale(1.1); }

.stars-display {
    font-size: 2rem;
    color: var(--star-color);
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

/* Sections */
.section-label {
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.sparkle { color: var(--primary-color); font-size: 1.2rem; }

/* Language Selector exact match */
.language-selection {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.lang-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.lang-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Review Length Selector */
.review-length-selection {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.length-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.length-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Chips exact match */
.prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: flex-start;
}
.prompt-chip {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.prompt-chip:hover, .prompt-chip.selected {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05); /* very light primary */
}

/* Choice Buttons */
.choice-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.choice-btn {
    background: #334155;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.choice-btn:hover, .choice-btn.active-choice {
    background: #1e293b;
    border-color: #8b5cf6;
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}
.choice-icon {
    font-size: 1.8rem;
    color: #c084fc;
    margin-bottom: 0.75rem;
}
.choice-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-family: var(--font-family);
}
.choice-desc {
    font-size: 0.85rem;
    color: #cbd5e1;
    font-family: var(--font-family);
}

/* Review Box */
.copy-box {
    background: var(--bg-gray);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.editable-review {
    width: 100%;
    font-size: 0.95rem;
    color: var(--text-main);
    background: transparent;
    border: none;
    resize: none;
    font-family: inherit;
    outline: none;
    min-height: 80px;
    line-height: 1.6;
}

.copy-box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.meta-info {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.copy-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: opacity 0.2s;
}
.action-btn:hover { opacity: 0.7; }
.action-btn svg { width: 14px; height: 14px; }

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
}

.primary-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    margin-bottom: 0.75rem;
}
.primary-btn:hover { background: var(--primary-hover); }

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

.whatsapp-btn { background: var(--whatsapp-color); color: white; border: none; margin-top:0.5rem; }

.text-btn { background: transparent; color: var(--text-muted); border: none; margin-top: 1rem; font-size: 0.9rem;}
.text-btn:hover { color: var(--text-main); }

.hidden { display: none !important; }

/* Form Elements */
.input-group { margin-bottom: 1.25rem; text-align: left; }
.input-group label { display: block; font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--text-muted); font-weight: 500;}
.input-group input, .input-group textarea {
    width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border-color);
    border-radius: 8px; font-family: inherit; outline: none; transition: border-color 0.2s;
}
.input-group input:focus, .input-group textarea:focus { border-color: var(--primary-color); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.step:not(.hidden) { animation: fadeIn 0.3s ease forwards; }
