:root {
    --bg-color: #0b0f19;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --success: #10b981;
    
    --shape-1: #8b5cf6;
    --shape-2: #3b82f6;
    --shape-3: #ec4899;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Dynamic background shapes */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.lang-switcher {
    display: inline-flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.4rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    margin-bottom: 2rem;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.shape {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--shape-1);
}

.shape-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--shape-2);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: var(--shape-3);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 15%) scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

header {
    text-align: center;
    margin-bottom: 4rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

header p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 900px) {
    .app-grid {
        grid-template-columns: 3fr 2fr;
    }
}

.panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
}

.input-group {
    margin-bottom: 3rem;
    position: relative;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group h2 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
}

.input-group h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--glass-border), transparent);
    margin-left: 1rem;
}

.row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.row:last-child {
    margin-bottom: 0;
}

.field {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
}

.field label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
}

.field small {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.field input[type="number"] {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    font-size: 1.05rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    width: 100%;
}

.field input[type="number"]:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(15, 23, 42, 0.6);
}

.field input[type="number"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.checkbox-field {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1rem !important;
    font-weight: 600;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 1.4rem;
    height: 1.4rem;
    accent-color: var(--accent);
    cursor: pointer;
}

.actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.btn-clear {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* Result panel specifics */
.result-panel {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-color: rgba(99, 102, 241, 0.2);
}

.result-sticky {
    position: sticky;
    top: 3rem;
}

.result-sticky h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    text-align: center;
    color: #fff;
}

.breakdown-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.breakdown-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.breakdown-list li:hover {
    color: #fff;
}

.breakdown-list .value {
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.breakdown-list .subtotal {
    margin-top: 0.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.15rem;
    color: #fff;
}

.breakdown-list .subtotal .value {
    color: #a5b4fc;
}

#tax-line .label {
    color: var(--text-muted);
}
#tax-line .value {
    color: #fff;
}

.final-price-container {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.final-price-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.final-price-container h3 {
    font-size: 1.1rem;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-weight: 800;
}

.final-price {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.kleinunternehmer-notice {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.2rem;
    display: block;
    line-height: 1.4;
    background: rgba(0,0,0,0.2);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px dashed rgba(255,255,255,0.1);
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2.5rem;
    }
    .panel {
        padding: 1.5rem;
    }
    .final-price {
        font-size: 2.5rem;
    }
}
