/* MG Mind Analyzer - Modern FAAS Style */
:root {
    --mg-primary: #a78bfa;
    --mg-primary-light: #c4b5fd;
    --mg-primary-dark: #7c3aed;
    --mg-secondary: #5eead4;
    --mg-secondary-light: #99f6e4;
    --mg-secondary-dark: #14b8a6;
    --mg-accent: #fbbf24;
    --mg-bg-light: #faf5ff;
    --mg-bg-white: #ffffff;
    --mg-text-primary: #1f2937;
    --mg-text-secondary: #6b7280;
    --mg-border: #e5e7eb;
    --mg-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --mg-shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
    --mg-radius: 20px;
    --mg-radius-lg: 24px;
}

.mg-mind-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header mit Glassmorphism */
.mg-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(94, 234, 212, 0.1) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--mg-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--mg-shadow-lg);
}

.mg-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    padding: 20px;
    background: linear-gradient(135deg, var(--mg-primary), var(--mg-secondary));
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(167, 139, 250, 0.4);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.mg-icon-wrapper svg {
    width: 100%;
    height: 100%;
    color: white;
}

.mg-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--mg-primary-dark), var(--mg-secondary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
}

.mg-subtitle {
    font-size: 1.125rem;
    color: var(--mg-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Form Container mit Glassmorphism */
#mg-mind-form {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-radius: var(--mg-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--mg-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Fragen */
.mg-question-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(250, 245, 255, 0.5) 0%, rgba(236, 254, 255, 0.5) 100%);
    border-radius: var(--mg-radius);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.mg-question-group:hover {
    border-color: var(--mg-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(167, 139, 250, 0.2);
}

.mg-question-text {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--mg-text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--mg-primary), var(--mg-secondary));
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Likert-Skala */
.mg-likert-scale {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.mg-likert-option {
    flex: 1;
    position: relative;
}

.mg-likert-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mg-likert-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: white;
    border: 2px solid var(--mg-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.likert-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mg-bg-light);
    border: 3px solid var(--mg-border);
    transition: all 0.3s ease;
    position: relative;
}

.likert-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mg-primary), var(--mg-secondary));
    transition: transform 0.3s ease;
}

.mg-likert-option input[type="radio"]:checked + .mg-likert-label .likert-circle::after {
    transform: translate(-50%, -50%) scale(1);
}

.mg-likert-option input[type="radio"]:checked + .mg-likert-label {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(94, 234, 212, 0.1));
    border-color: var(--mg-primary);
}

.mg-likert-option input[type="radio"]:checked + .mg-likert-label .likert-circle {
    border-color: var(--mg-primary);
}

.likert-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mg-text-secondary);
    text-align: center;
}

.mg-likert-option:hover .mg-likert-label {
    border-color: var(--mg-primary-light);
    transform: translateY(-2px);
}

/* Scale Labels */
.mg-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding: 0 0.5rem;
}

.scale-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mg-text-secondary);
}

/* Submit Button */
.mg-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--mg-primary), var(--mg-secondary));
    border: none;
    border-radius: var(--mg-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(167, 139, 250, 0.4);
    margin-top: 2rem;
}

.mg-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(167, 139, 250, 0.5);
}

.mg-submit-btn:active {
    transform: translateY(-1px);
}

.btn-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.mg-submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Results Section */
#mg-mind-result {
    margin-top: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.05) 0%, rgba(94, 234, 212, 0.05) 100%);
    backdrop-filter: blur(20px);
    border-radius: var(--mg-radius-lg);
    border: 2px solid var(--mg-primary-light);
    box-shadow: var(--mg-shadow-lg);
}

.result-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.result-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    padding: 16px;
    background: linear-gradient(135deg, var(--mg-primary), var(--mg-secondary));
    border-radius: 50%;
    color: white;
    box-shadow: 0 8px 20px rgba(167, 139, 250, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.result-icon svg {
    width: 100%;
    height: 100%;
}

/* Progress Circle */
.mg-progress-container {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto 2rem;
}

.mg-progress-circle {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: var(--mg-border);
    stroke-width: 12;
}

.progress-bar {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 628;
    stroke-dashoffset: 628;
    transition: stroke-dashoffset 2s ease;
}

.progress-text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percentage {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--mg-primary-dark), var(--mg-secondary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mg-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Interpretation */
.mg-interpretation {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--mg-radius);
    margin-bottom: 2rem;
    border: 2px solid;
}

.interpretation-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.interpretation-text {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--mg-text-secondary);
    margin: 0;
}

/* CTA Box */
.mg-cta-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 146, 60, 0.1));
    border-radius: var(--mg-radius);
    border: 2px solid var(--mg-accent);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.2);
    margin-top: 2rem;
}

.cta-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: var(--mg-shadow);
}

.cta-content {
    flex: 1;
}

.cta-content p {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--mg-text-primary);
    line-height: 1.5;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--mg-accent), #f97316);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.4);
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.5);
    color: white;
    text-decoration: none;
}

.cta-button .arrow {
    transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
    transform: translateX(4px);
}

/* Utility */
.hidden {
    display: none !important;
}

/* Loading State */
.mg-submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.mg-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mg-mind-result:not(.hidden) {
    animation: slideInUp 0.6s ease;
}

/* Notification */
.mg-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1.25rem 1.75rem;
    background: white;
    border-radius: var(--mg-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    font-size: 0.9375rem;
    font-weight: 600;
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.4s ease;
    border-left: 4px solid;
}

.mg-notification.error {
    border-left-color: #ef4444;
    color: #991b1b;
}

.mg-notification.success {
    border-left-color: #10b981;
    color: #065f46;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mg-mind-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .mg-header {
        padding: 2rem 1.5rem;
    }

    .mg-header h2 {
        font-size: 1.75rem;
    }

    #mg-mind-form {
        padding: 1.5rem;
    }

    .mg-question-group {
        padding: 1rem;
    }

    .mg-likert-scale {
        gap: 0.25rem;
    }

    .mg-likert-label {
        padding: 0.75rem 0.25rem;
    }

    .likert-circle {
        width: 32px;
        height: 32px;
    }

    .likert-text {
        font-size: 0.625rem;
    }

    .mg-scale-labels {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .mg-progress-container {
        width: 200px;
        height: 200px;
    }

    .progress-percentage {
        font-size: 2.75rem;
    }

    .mg-cta-box {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    .mg-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}