* {

    box-sizing: border-box;
}

:root {
    --background: hsl(210, 40%, 98%);
    --foreground: hsl(215, 25%, 15%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(215, 25%, 15%);
    --primary: hsl(211, 80%, 57%);
    --primary-foreground: hsl(0, 0%, 100%);
    --secondary: hsl(210, 40%, 96%);
    --secondary-foreground: hsl(211, 80%, 30%);
    --muted: hsl(210, 30%, 94%);
    --muted-foreground: hsl(215, 16%, 47%);
    --accent: hsl(187, 72%, 53%);
    --accent-foreground: hsl(0, 0%, 100%);
    --destructive: hsl(0, 75%, 55%);
    --destructive-foreground: hsl(0, 0%, 100%);
    --border: hsl(210, 25%, 88%);
    --input: hsl(210, 25%, 88%);
    --success: hsl(142, 71%, 45%);
    --success-foreground: hsl(0, 0%, 100%);
    --radius: 0.75rem;
}

MR-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, hsl(210, 40%, 98%), hsl(210, 30%, 94%));
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

.MR-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.MR-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.MR-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.MR-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.MR-back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--secondary);
}

.MR-main {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 4px 24px hsla(215, 25%, 15%, 0.1);
}

.MR-progress-container {
    margin-bottom: 2rem;
}

.MR-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.MR-progress-text {
    color: var(--muted-foreground);
}

.MR-progress-percent {
    color: var(--primary);
    font-weight: 600;
}

.MR-progress-bar {
    height: 0.5rem;
    background: var(--secondary);
    border-radius: 9999px;
    overflow: hidden;
}

.MR-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.MR-step-container {
    animation: fadeIn 0.5s ease;
}

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

.MR-step-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--foreground);
}

.MR-step-hint {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    background: var(--muted);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.MR-button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.MR-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.MR-btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.MR-btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px hsla(211, 80%, 57%, 0.3);
}

.MR-btn-outline {
    background: transparent;
    color: var(--foreground);
    border: 2px solid var(--border);
}

.MR-btn-outline:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--secondary);
    color: var(--primary);
}

.MR-btn-yes:hover:not(:disabled) {
    border-color: var(--primary);
    background: hsla(211, 80%, 57%, 0.05);
    color: var(--primary);
}

.MR-btn-no:hover:not(:disabled) {
    border-color: var(--destructive);
    background: hsla(0, 75%, 55%, 0.05);
    color: var(--destructive);
}

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

.MR-input-group {
    margin-top: 1.5rem;
}

.MR-input, .MR-select {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    transition: all 0.3s ease;
}

.MR-input:focus, .MR-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(211, 80%, 57%, 0.1);
}

.MR-input-with-unit {
    position: relative;
}

.MR-input-unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    font-weight: 500;
    pointer-events: none;
}

.MR-address-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.MR-address-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.MR-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.MR-input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.MR-input-error {
    font-size: 0.875rem;
    color: var(--destructive);
}

.MR-welcome-content {
    text-align: center;
}

.MR-welcome-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

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

.MR-feature-card {
    padding: 1.5rem;
    background: var(--secondary);
    border-radius: var(--radius);
    text-align: center;
}

.MR-feature-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card);
    color: var(--primary);
}

.MR-feature-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.MR-disclaimer {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.MR-result-grid {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.MR-result-card {
    padding: 2rem;
    background: var(--secondary);
    border-radius: var(--radius);
}

.MR-result-card.MR-primary {
    background: linear-gradient(135deg, hsla(211, 80%, 57%, 0.1), hsla(187, 72%, 53%, 0.1));
    border: 2px solid hsla(211, 80%, 57%, 0.2);
}

.MR-result-card.MR-info {
    background: hsla(211, 80%, 57%, 0.05);
    border: 1px solid hsla(211, 80%, 57%, 0.2);
}

.MR-result-card.MR-success {
    background: hsla(142, 71%, 45%, 0.05);
    border: 1px solid hsla(142, 71%, 45%, 0.2);
}

.MR-result-label {
    font-size: 1rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    text-align: center;
}

.MR-result-value {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.MR-result-unit {
    font-size: 1.5rem;
    color: var(--muted-foreground);
    -webkit-text-fill-color: var(--muted-foreground);
}

.MR-result-info {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-align: center;
}

.MR-alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.MR-alert-success {
    background: hsla(142, 71%, 45%, 0.1);
    color: var(--foreground);
    border: 1px solid var(--success);
}

.MR-alert-icon {
    flex-shrink: 0;
}

.MR-exit-screen {
    text-align: center;
}

.MR-exit-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--muted);
    color: var(--muted-foreground);
}

.MR-exit-message {
    background: var(--muted);
    padding: 2rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    font-size: 1.125rem;
}

.MR-wohnlage-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--secondary);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--primary);
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .MR-container {
        padding: 1rem;
    }

    .MR-main {
        padding: 1.5rem;
    }

    .MR-step-title {
        font-size: 1.5rem;
    }

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

    .MR-address-row {
        grid-template-columns: 1fr;
    }

    .MR-result-value {
        font-size: 2.5rem;
    }
}