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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #e8e8e8 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Initial Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.popup-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.popup-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.popup-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popup-body {
    padding: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.info-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #2a5298;
}

.info-section h4 {
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section ul {
    list-style: none;
}

.info-section li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.info-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.adaptive-note {
    background: #e8f4f8;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #bee5eb;
    margin-top: 1.5rem;
}

.adaptive-note p {
    margin-bottom: 0.5rem;
}

.adaptive-note strong {
    color: #1e3c72;
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.dont-show-again {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 2s infinite;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.step.completed {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
}

.step:hover:not(.active) {
    transform: scale(1.05);
    background: #dee2e6;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #1e3c72;
}

/* Preparation Phase */
.preparation-phase {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    animation: slideInUp 0.6s ease-out;
}

.preparation-phase h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
    text-align: center;
    margin-bottom: 0.5rem;
}

.mmr-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    font-weight: 500;
}

.preparation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.prep-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prep-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.prep-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
}

.prep-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.2rem;
}

.prep-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 1rem;
}

.prep-card ul {
    list-style: none;
}

.prep-card li {
    padding: 0.4rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: #555;
}

.prep-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2a5298;
    font-weight: bold;
}

.start-button-container {
    text-align: center;
    margin-top: 2.5rem;
}

.btn-start {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 82, 152, 0.4);
}

.btn-start:active {
    transform: translateY(0);
}

.btn-start::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-start:hover::before {
    left: 100%;
}

/* Form Container */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    flex: 1;
    animation: slideInUp 0.6s ease-out;
}

.form-step {
    display: none;
    animation: slideInRight 0.4s ease-out;
}

.form-step.active {
    display: block;
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.step-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Groups */
.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* Help Button */
.help-btn {
    background: #e8f4f8;
    border: 1px solid #bee5eb;
    color: #2a5298;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.help-btn:hover {
    background: #bee5eb;
    transform: scale(1.05);
}

.help-content {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
}

.help-content strong {
    color: #1e3c72;
    display: block;
    margin-bottom: 0.5rem;
}

.help-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.help-content li {
    margin-bottom: 0.25rem;
    color: #555;
}

.help-content p {
    margin: 0.75rem 0 0 0;
    color: #666;
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
    transform: translateY(-1px);
}

input.error,
select.error,
textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

input.success,
select.success,
textarea.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 1rem;
    color: #666;
    font-weight: 600;
    z-index: 1;
    pointer-events: none;
}

.input-group input {
    padding-left: 2rem;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Checkbox Groups */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Simple Checkbox Styling */
.simple-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.simple-checkbox:hover {
    border-color: #2a5298;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.simple-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2a5298;
    cursor: pointer;
    flex-shrink: 0;
}

.simple-checkbox input[type="checkbox"]:checked {
    accent-color: #1e3c72;
}

.simple-checkbox input[type="checkbox"]:checked + * {
    color: #1e3c72;
    font-weight: 500;
}

.video-confirmation {
    background: #e8f4f8;
    border-color: #bee5eb;
    padding: 1rem;
    margin-top: 1rem;
}

/* Legacy checkbox-item for backward compatibility */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checkbox-item:hover {
    border-color: #2a5298;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 28px;
    height: 28px;
    border: 3px solid #2a5298;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #00ff00, #32cd32);
    border-color: #00ff00;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.5);
    transform: scale(1.1);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 900;
    font-size: 1.4rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    line-height: 1;
}

.checkbox-item input[type="checkbox"]:checked ~ * {
    color: #1e3c72;
    font-weight: 500;
}

/* Video Container */
.video-container {
    margin: 2rem 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-container iframe {
    border: none;
    border-radius: 12px;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.error-message.show {
    display: block;
}

/* Summary Content */
.summary-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.summary-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-section h3 {
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-section p {
    color: #555;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.summary-list {
    list-style: none;
    margin: 0.5rem 0;
}

.summary-list li {
    color: #555;
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.summary-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2a5298;
    font-weight: bold;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.btn-primary,
.btn-secondary,
.btn-submit {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    color: white;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 82, 152, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-submit {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Button shine effect */
.btn-primary::before,
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before,
.btn-submit:hover::before {
    left: 100%;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.modal-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success .modal-header i {
    color: #28a745;
}

.error .modal-header i {
    color: #dc3545;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e3c72;
}

.modal-body {
    padding: 2rem;
    text-align: center;
    color: #555;
    line-height: 1.6;
}

.modal-actions {
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #2a5298;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .preparation-phase,
    .form-container {
        padding: 1.5rem;
    }

    .preparation-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .prep-card {
        padding: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .popup-content {
        width: 95%;
        max-height: 95vh;
    }

    .popup-body {
        padding: 1.5rem;
    }

    .progress-steps {
        gap: 0.5rem;
    }

    .step {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .form-navigation button {
        width: 100%;
        justify-content: center;
    }

    .video-container iframe {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .step-header h2 {
        font-size: 1.5rem;
    }

    .btn-start {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .preparation-phase h2 {
        font-size: 1.5rem;
    }

    .modal-content {
        width: 95%;
    }

    .video-container iframe {
        height: 200px;
    }
}