/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f8f8;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Promotional Banner */
.promo-banner {
    background: #2d573e;
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Brand Logo */
.brand-logo {
    text-align: center;
    padding: 40px 20px 30px;
}

.logo-image {
    height: 80px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Quiz Container */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Quiz Card */
.quiz-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* Progress Section */
.progress-section {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.question-count {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.progress-percentage {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2d573e;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 33%;
}

/* Quiz Content */
.question-container {
    padding: 40px 32px;
    min-height: 400px;
}

.question-title {
    font-size: 24px;
    font-weight: 600;
    color: #2d573e;
    margin-bottom: 32px;
    text-align: left;
    line-height: 1.3;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.option:hover {
    border-color: #2d573e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 87, 62, 0.15);
}

.option.selected {
    border-color: #2d573e;
    background: #2d573e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 87, 62, 0.3);
}

.option.selected::before {
    content: '✓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 18px;
}

.option-text {
    font-size: 16px;
    font-weight: 500;
    color: inherit;
    pointer-events: none;
}

/* Multi-select styles */
.option.multi-select {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.option.selected .checkbox {
    background: white;
    border-color: white;
}

.checkbox::after {
    content: '✓';
    color: #2d573e;
    font-weight: bold;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.option.selected .checkbox::after {
    opacity: 1;
}

/* Results Styles */
.results-container {
    text-align: center;
    padding: 40px 32px;
}

.results-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2d573e;
    margin-bottom: 16px;
}

.results-header p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 40px;
}

.recommendations {
    text-align: left;
}

.recommendations-header {
    text-align: center;
    margin-bottom: 40px;
}

.recommendations-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2d573e;
    margin-bottom: 8px;
}

.recommendations-header p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 0;
}

.product-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.product-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 16px;
}

.product-benefits {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-benefits li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

.product-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 12px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 16px;
    margin-top: auto;
    text-align: center;
}

.product-cta {
    width: 100%;
    background: #2d573e;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-cta:hover {
    background: #1e3d2a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 87, 62, 0.3);
}

.admin-section {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 32px;
    text-align: center;
}

.admin-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

/* Admin Link */
.admin-link {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-link-btn {
    background: rgba(45, 87, 62, 0.1);
    color: #2d573e;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(45, 87, 62, 0.2);
    transition: all 0.2s ease;
}

.admin-link-btn:hover {
    background: rgba(45, 87, 62, 0.2);
    border-color: rgba(45, 87, 62, 0.3);
}

/* Admin Modal Styles */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.admin-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.admin-modal-body {
    padding: 24px;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-product-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.admin-product-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.admin-form-group {
    margin-bottom: 16px;
}

.admin-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.admin-form-group input,
.admin-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.2s ease;
}

.admin-form-group input:focus,
.admin-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-form-group textarea {
    min-height: 60px;
    resize: vertical;
}

.admin-modal-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Navigation */
.quiz-navigation {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 32px;
    border-top: 1px solid #f0f0f0;
}

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #2d573e;
    color: white;
    box-shadow: 0 4px 12px rgba(45, 87, 62, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: #1e3d2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 87, 62, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #6b7280;
    border: 2px solid #d1d5db;
}

.btn-outline:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container {
        padding: 0 16px 40px;
    }
    
    .quiz-card {
        border-radius: 16px;
    }
    
    .progress-section {
        padding: 24px 20px 20px;
    }
    
    .question-container {
        padding: 32px 20px;
    }
    
    .question-title {
        font-size: 20px;
    }
    
    .option {
        padding: 16px 20px;
    }
    
    .product-cards {
        grid-template-columns: 1fr;
        padding: 0 10px;
        gap: 20px;
    }
    
    .results-container {
        padding: 32px 20px;
    }
    
    .quiz-navigation {
        flex-direction: column;
        padding: 24px 20px;
    }
    
    .results-actions {
        flex-direction: column;
        margin-top: 32px;
    }
    
    .btn {
        width: 100%;
    }
    
    .brand-logo {
        padding: 30px 20px 20px;
    }
    
    .logo-image {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        padding: 0 12px 32px;
    }
    
    .quiz-card {
        border-radius: 12px;
    }
    
    .progress-section {
        padding: 20px 16px 16px;
    }
    
    .question-container {
        padding: 24px 16px;
    }
    
    .question-title {
        font-size: 18px;
    }
    
    .option {
        padding: 14px 16px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .product-cards {
        padding: 0 5px;
        gap: 16px;
    }
    
    .results-container {
        padding: 24px 16px;
    }
    
    .quiz-navigation {
        padding: 20px 16px;
    }
    
    .results-actions {
        margin-top: 24px;
    }
    
    .brand-logo {
        padding: 24px 16px 16px;
    }
    
    .logo-image {
        height: 50px;
    }
}

/* Animations */
.question-container {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-container {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
