:root {
    --primary-color: #7B61FF;
    --primary-light: #9F8BFF;
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-main: #333333;
    --text-secondary: #666666;
    --shadow-soft: 0 4px 20px rgba(123, 97, 255, 0.1);
    --radius-lg: 20px;
    --radius-md: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    background-image: none !important; /* Override existing bg */
}

/* Header */
.app-header {
    background: var(--card-bg);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.brand-logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 6px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.report-btn {
    background: #F0F2F5;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Main Content */
.main-container {
    padding: 80px 20px 40px;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0;
}

.tag-pill {
    background: #EBE5FF;
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-main);
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.primary-btn {
    background: linear-gradient(135deg, #7B61FF 0%, #5E43FF 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 10px 20px rgba(123, 97, 255, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.primary-btn:active {
    transform: scale(0.98);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.info-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.info-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.info-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Dimensions Grid */
.section-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 30px;
}

.dimension-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

.dimension-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dim-icon {
    font-size: 32px;
}

/* Custom Checkbox/Radio Styles */
.custom-option-container {
    margin-bottom: 15px;
    position: relative;
}

.custom-option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-option-label {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 2px solid #EAEAEA;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    color: #333;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.custom-option-label:hover {
    border-color: #D0D0D0;
    background: #FAFAFA;
}

.custom-option-icon {
    width: 24px;
    height: 24px;
    border: 2px solid #D0D0D0;
    border-radius: 6px; /* 50% for radio */
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: #FFF;
}

.custom-option-icon svg {
    width: 14px;
    height: 14px;
    fill: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Selected State */
.custom-option-input:checked + .custom-option-label {
    border-color: var(--primary-color);
    background-color: #F6F4FF; /* Very light primary color */
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.15);
    font-weight: 600;
}

.custom-option-input:checked + .custom-option-label .custom-option-icon {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.custom-option-input:checked + .custom-option-label .custom-option-icon svg {
    opacity: 1;
    transform: scale(1);
}

/* Radio Specifics (if needed later, but using same style for consistency now) */
.custom-option-input[type="radio"] + .custom-option-label .custom-option-icon {
    border-radius: 50%;
}

.dim-title {
    font-weight: 600;
    font-size: 15px;
}

.dim-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Question Page Specifics */
.question-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    box-shadow: var(--shadow-soft);
    margin-top: 20px;
}

.progress-bar-container {
    height: 6px;
    background: #EBE5FF;
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.question-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-main);
}

/* Custom Input Styles */
.custom-option {
    display: block;
    background: #F8F9FA;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-option:hover {
    background: #F0F2F5;
}

.custom-option.selected {
    border-color: var(--primary-color);
    background: #F3F0FF;
    color: var(--primary-color);
    font-weight: 500;
}

/* Overriding bootstrap basics if needed */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-control {
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid #ddd;
    box-shadow: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1);
}

/* Loading Animation */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* MBTI Test Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    border-color: var(--primary-light);
    background: #FAF9FF;
}

.option-item.selected {
    border-color: var(--primary-color);
    background: #F5F0FF;
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
}

.option-item.selected .option-radio {
    border-color: var(--primary-color);
}

.option-item.selected .option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.option-text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    transition: width 0.3s ease;
}
