:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.5);
    --gradient-start: #22d3ee;
    --gradient-end: #0ea5e9;
    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    /* Prevent scrolling for app-like feel */
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 48px;
    width: auto;
}

.highlight {
    color: var(--accent-color);
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 150px;
}

.progress-bar {
    flex-grow: 1;
    height: 6px;
    background: #334155;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Main Content Area */
main {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Views */
.view {
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.view.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 10;
}

/* Typography */
h1.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.text-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 400px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #334155;
    color: var(--text-primary);
    margin-left: 1rem;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Question Card */
.question-card {
    width: 100%;
}

.question-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

.option-btn {
    background: var(--card-bg);
    border: 1px solid #334155;
    padding: 1.5rem;
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.place-input {
    cursor: text;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.place-input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.option-btn:hover {
    border-color: var(--accent-color);
    background: #253349;
    transform: scale(1.02);
}

.option-btn:active {
    transform: scale(0.98);
}

/* Result Card */
.result-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.result-header {
    margin-bottom: 1.5rem;
}

.match-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.result-image-placeholder {
    font-size: 6rem;
    margin: 2rem 0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.result-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 480px) {
    .result-actions {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--accent-color);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Footer */
footer {
    text-align: center;
    color: #475569;
    font-size: 0.875rem;
    padding-top: 1rem;
}

.sub-footer {
    margin-top: 1rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Responsive */
@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.blog-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.blog-link:hover {
    color: var(--accent-color);
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.lang-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Blog Specific Styles */
.blog-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
    flex-grow: 1;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* Article Card */
.article-card {
    background: var(--card-bg);
    border: 1px solid #334155;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-tag {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.article-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.read-more {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.3s;
}

.article-card:hover .read-more {
    gap: 0.5rem;
}

/* Single Blog Post */
.blog-post {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid #334155;
    width: 100%;
}

.post-header {
    height: auto;
    display: block;
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin: 1rem auto;
    line-height: 1.3;
    text-wrap: balance;
    max-width: 100%;
    padding: 0 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.post-content h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content strong {
    color: var(--text-primary);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.3s;
}

.btn-text:hover {
    color: var(--accent-color);
}

/* Scrollable Page Override (for Blog) */
.scrollable-page body {
    height: auto;
    overflow-y: auto;
    display: block;
    min-height: 100vh;
}

.scrollable-page .app-container {
    height: auto;
    max-height: none;
    width: 100%;
    max-width: 1000px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .blog-post {
        padding: 1.5rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }
}

/* Newsletter Specific Styles */
.newsletter-content {
    text-align: center;
}

.newsletter-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.newsletter-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.newsletter-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-glow);
    background-color: rgba(255, 255, 255, 0.1);
}

.newsletter-btn {
    width: 100%;
}

/* Newsletter Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    text-align: left;
    margin-bottom: 1rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
    /* Hide default checkbox */
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    margin-top: 2px;
}

.checkbox-label input:checked+.checkbox {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.checkbox-label input:checked+.checkbox::after {
    content: '✓';
    color: #1e293b;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Brevo Form Integration */
.sib-form-message-panel {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

#success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
}

#error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.sib-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
}

.entry__error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
    text-align: left;
    padding-left: 1rem;
}

.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .app-container {
        padding: 1rem;
    }

    .result-card {
        padding: 1.5rem;
    }

    h1.hero-title {
        font-size: 2rem;
    }

    .result-image-placeholder {
        font-size: 4rem;
        margin: 1.5rem 0;
    }

    .result-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-secondary {
        margin-left: 0;
    }
}

/* Classic Product Page Styles - Immersive Update */
.product-detail-container {
    padding: 0 0 4rem 0;
    width: 100%;
    text-align: center;
}

.product-hero {
    position: relative;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
}

.product-hero .emoji-display {
    font-size: 5rem;
    filter: drop-shadow(0 0 30px rgba(34, 211, 238, 0.4));
    animation: float 6s ease-in-out infinite;
}

.product-detail-container h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 1rem 0;
    line-height: 1.1;
    text-wrap: balance;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    padding: 0 1rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-content {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    text-align: left;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0;
}

/* Override View behavior for scrollable pages to prevent absolute positioning overlap issues */
.scrollable-page .view {
    position: relative;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.scrollable-page .view.active {
    position: relative;
}

/* Details View Styles */
.details-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.details-textarea {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid #334155;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-main);
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.details-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-glow);
    background: rgba(255, 255, 255, 0.08);
}

.details-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.details-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.details-actions .btn-secondary {
    margin-left: 0;
}

/* User Summary Section on Product Page */
.user-summary-section {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 16px;
    text-align: left;
}

.user-summary-section h3 {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.additional-details-text {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.additional-details-text .summary-label {
    margin-bottom: 0.5rem;
}

.additional-details-text p {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}