@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --tcm-font: 'Plus Jakarta Sans', sans-serif;
    --tcm-primary: #6366f1;
    --tcm-primary-hover: #4f46e5;
    --tcm-primary-light: rgba(99, 102, 241, 0.1);
    --tcm-success: #10b981;
    --tcm-success-hover: #059669;
    --tcm-secondary: #64748b;
    --tcm-danger: #ef4444;
    --tcm-bg-card: rgba(255, 255, 255, 0.75);
    --tcm-text-main: #1e293b;
    --tcm-text-muted: #64748b;
    --tcm-border: rgba(226, 232, 240, 0.8);
    --tcm-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --tcm-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --tcm-radius: 16px;
    --tcm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tcm-survey-wrap {
    font-family: var(--tcm-font);
    color: var(--tcm-text-main);
    line-height: 1.6;
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    box-sizing: border-box;
}

.tcm-survey-wrap h1,
.tcm-survey-wrap h2,
.tcm-survey-wrap h3,
.tcm-survey-wrap h4,
.tcm-survey-wrap h5,
.tcm-survey-wrap h6 {
    color: #1e293b !important;
}

.tcm-survey-wrap .tcm-step-indicator {
    color: var(--tcm-primary) !important;
}

.tcm-survey-wrap * {
    box-sizing: border-box;
}

/* Glassmorphism Survey Card */
.tcm-survey-card {
    display: none;
    background: var(--tcm-bg-card);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--tcm-radius);
    padding: 40px;
    box-shadow: var(--tcm-shadow);
    transition: var(--tcm-transition);
    position: relative;
    overflow: hidden;
}

.tcm-survey-card.active {
    display: block !important;
}

.tcm-survey-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
}

/* Intro Screen styling */
#tcm-step-info h2 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    text-align: center;
}

#tcm-step-info p {
    text-align: center;
    color: var(--tcm-text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.tcm-form-group {
    margin-bottom: 24px;
}

.tcm-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #1e293b !important;
}

.tcm-form-group label .required {
    color: var(--tcm-danger);
}

.tcm-input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--tcm-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    color: #1e293b !important;
    transition: var(--tcm-transition);
}

.tcm-input:focus {
    outline: none;
    border-color: var(--tcm-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Gender Toggle Button styling */
.tcm-gender-selector {
    display: flex;
    gap: 16px;
}

.tcm-gender-option {
    flex: 1;
    cursor: pointer;
}

.tcm-gender-option input[type="radio"],
.tcm-gender-option input {
    display: none !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

.tcm-gender-option .gender-btn {
    display: block;
    text-align: center;
    padding: 14px;
    border: 1px solid var(--tcm-border);
    border-radius: 12px;
    font-weight: 600;
    background: #ffffff;
    color: #1e293b !important;
    transition: var(--tcm-transition);
}

.tcm-gender-option input:checked + .gender-btn {
    border-color: var(--tcm-primary) !important;
    background: var(--tcm-primary-light) !important;
    color: var(--tcm-primary) !important;
    box-shadow: var(--tcm-glow);
}

/* Progress Step Header */
.tcm-step-indicator {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tcm-primary);
    margin-bottom: 8px;
}

.tcm-card-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e293b !important;
}

.tcm-progress-bar-container {
    height: 6px;
    background: rgba(226, 232, 240, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 30px;
}

.tcm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--tcm-primary), #a855f7);
    border-radius: 3px;
    width: 0;
    transition: width 0.4s ease;
}

/* Questions and Custom Options Scale */
.tcm-question-row {
    padding: 24px 0;
    border-bottom: 1px solid var(--tcm-border);
    animation: fadeInUp 0.4s ease backwards;
    transition: var(--tcm-transition);
}

.tcm-question-row.tcm-unanswered-highlight {
    border-left: 4px solid var(--tcm-danger);
    padding-left: 16px;
    background: rgba(239, 68, 68, 0.02);
    border-bottom-color: rgba(239, 68, 68, 0.1);
}

.tcm-question-row:last-child {
    border-bottom: none;
}

.tcm-question-text {
    font-size: 1.05rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 16px;
    color: #1e293b !important;
}

.tcm-options-scale {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.tcm-option-item {
    flex: 1;
    cursor: pointer;
    text-align: center;
}

.tcm-survey-wrap input[type="radio"] {
    display: none !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none;
}

.tcm-option-item .option-label {
    display: block;
    padding: 12px 8px;
    border: 1px solid var(--tcm-border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #ffffff;
    color: #1e293b !important;
    transition: var(--tcm-transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.tcm-option-item .option-label:hover {
    border-color: var(--tcm-primary);
    background: var(--tcm-primary-light);
    color: var(--tcm-primary) !important;
}

.tcm-option-item input:checked + .option-label {
    background: var(--tcm-primary) !important;
    border-color: var(--tcm-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

/* Buttons */
.tcm-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tcm-transition);
    border: none;
    text-decoration: none;
    text-align: center;
}

.tcm-btn-primary {
    background: var(--tcm-primary);
    color: #fff;
}

.tcm-btn-primary:hover {
    background: var(--tcm-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.tcm-btn-secondary {
    background: transparent;
    border: 1px solid var(--tcm-border);
    color: var(--tcm-text-muted);
}

.tcm-btn-secondary:hover {
    background: rgba(226, 232, 240, 0.4);
    color: var(--tcm-text-main);
}

.tcm-btn-success {
    background: var(--tcm-success);
    color: #fff;
}

.tcm-btn-success:hover {
    background: var(--tcm-success-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.tcm-card-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.tcm-form-action {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Spinner Loading */
.tcm-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top: 4px solid var(--tcm-primary);
    border-radius: 50%;
    margin: 30px auto;
    animation: spin 1s linear infinite;
}

.text-center {
    text-align: center;
}

/* Result Dashboard */
.tcm-result-header {
    text-align: center;
    margin-bottom: 40px;
}

.tcm-result-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1e293b !important;
}

.tcm-badge-verdict {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
    margin-bottom: 12px;
}

.tcm-badge-verdict.biased {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.tcm-result-desc {
    font-size: 1.1rem;
    color: #475569 !important;
}

/* Radar Chart Layout */
.tcm-chart-wrapper {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--tcm-border);
    padding: 24px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.tcm-chart-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
}

.tcm-radar-canvas {
    max-width: 100%;
}

/* Tabs & Recommendations Layout */
.tcm-tabs-navigation {
    display: flex;
    border-bottom: 2px solid var(--tcm-border);
    margin-bottom: 24px;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
}

/* Hide scrollbars for tabs navigation */
.tcm-tabs-navigation::-webkit-scrollbar {
    display: none;
}
.tcm-tabs-navigation {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tcm-tab-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--tcm-text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--tcm-transition);
}

.tcm-tab-btn:hover {
    color: var(--tcm-primary);
}

.tcm-tab-btn.active {
    color: var(--tcm-primary);
    border-bottom-color: var(--tcm-primary);
}

.tcm-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tcm-tab-content.active {
    display: block;
}

.tcm-advice-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--tcm-border);
    padding: 24px;
    margin-bottom: 20px;
}

.tcm-advice-card h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tcm-advice-card.advice-desc h4 { color: #8b5cf6; }
.tcm-advice-card.advice-diet h4 { color: #f59e0b; }
.tcm-advice-card.advice-lifestyle h4 { color: #10b981; }

.tcm-advice-card p {
    margin-bottom: 0;
    color: #475569;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive adjustment for options scale */
@media (max-width: 600px) {
    .tcm-options-scale {
        flex-direction: column;
        gap: 8px;
    }
    .tcm-option-item {
        width: 100%;
        display: block;
    }
    .tcm-survey-card {
        padding: 24px 16px;
    }
    .tcm-option-item .option-label {
        padding: 14px 20px;
        font-size: 0.95rem;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    }
    .tcm-tab-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    .tcm-card-footer .tcm-btn {
        width: 48%;
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    .tcm-form-action .tcm-btn {
        width: 100%;
    }
}

/* Contact Buttons Styling & Hover Animations */
.tcm-contact-btn:hover {
    transform: translateY(-3px) !important;
    opacity: 0.95;
}

@media (max-width: 600px) {
    .tcm-contact-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    .tcm-contact-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px !important;
    }
}
