/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Language selection page */
.language-selection {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
}

.logo h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
}

.subtitle {
    color: #666;
    margin-bottom: 40px;
}

.language-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.flag {
    font-size: 1.5rem;
}

/* Survey pages */
.survey-container {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.survey-header {
    text-align: center;
    margin-bottom: 30px;
}

.survey-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.survey-description {
    color: #666;
    font-size: 0.95rem;
}

.question-container {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    display: none !important;
    position: relative;
}

.question-container.active {
    opacity: 1;
    transform: translateY(0);
    display: block !important;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

/* Answer options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.option input[type="checkbox"] {
    margin-right: 10px;
}

.option input[type="radio"] {
    margin-right: 10px;
}

/* Matrix questions */
.matrix-container {
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.matrix-table th,
.matrix-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.matrix-table th {
    background: #f8f9fa;
    font-weight: 500;
}

.matrix-table td {
    cursor: pointer;
}

.matrix-table td:hover {
    background: #f8f9ff;
}

.matrix-table td.selected {
    background: #667eea;
    color: white;
}

/* Text input */
.text-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Navigation buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Progress bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* Hero section for path selection */
.hero-section-large {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.3;
}

.hero-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Path selection options */
.path-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.path-option {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.path-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.path-option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* Completion page */
.completion-container {
    text-align: center;
    padding: 40px 20px;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.completion-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.completion-message {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.seller-link {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 30px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.seller-link:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .language-selection,
    .survey-container {
        padding: 25px 20px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Force proper display on mobile */
    .question-container {
        display: none !important;
        opacity: 0 !important;
        transform: translateY(20px) !important;
    }
    
    .question-container.active {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Loading spinner */
.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); }
}
