:root {
    --primary: #ff4757;
    --primary-hover: #ff6b81;
    --bg: #f1f2f6;
    --card-bg: #ffffff;
    --text: #2f3542;
    --text-light: #747d8c;
    --border: #ced6e0;
    --success: #2ed573;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
}

body { 
    background-color: var(--bg); 
    color: var(--text); 
    padding: 10px; 
    display: flex; 
    justify-content: center; 
    align-items: flex-start; 
    min-height: 100vh; 
}

.container { 
    width: 100%; 
    max-width: 450px; 
}

/* Tabs */
.tabs { 
    display: flex; 
    gap: 5px; 
    margin-bottom: 10px; 
}

.tab-btn { 
    flex: 1; 
    padding: 12px; 
    background: #e4e7eb; 
    border: none; 
    border-radius: 10px; 
    font-weight: bold; 
    cursor: pointer; 
    color: var(--text-light); 
    font-size: 14px; 
    transition: 0.2s; 
}

.tab-btn.active { 
    background: var(--primary); 
    color: white; 
}

.card { 
    background: var(--card-bg); 
    padding: 20px 15px; 
    border-radius: 16px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); 
}

.tab-content { 
    display: none; 
}

.tab-content.active { 
    display: block; 
}

h2 { 
    text-align: center; 
    margin-bottom: 18px; 
    font-size: 22px; 
}

.form-group { 
    margin-bottom: 12px; 
}

label { 
    display: block; 
    margin-bottom: 4px; 
    font-size: 13px; 
    font-weight: 600; 
}

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

input { 
    width: 100%; 
    padding: 10px 40px 10px 12px; 
    font-size: 16px; 
    border: 2px solid var(--border); 
    border-radius: 10px; 
    outline: none; 
}

input:focus { 
    border-color: var(--primary); 
}

.unit { 
    position: absolute; 
    right: 12px; 
    color: var(--text-light); 
    font-size: 13px; 
    font-weight: 500; 
    pointer-events: none; 
}

button.btn-main { 
    width: 100%; 
    padding: 14px; 
    background-color: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 10px; 
    cursor: pointer; 
    font-size: 16px; 
    font-weight: bold; 
    margin-top: 5px; 
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2); 
}

button.btn-main:active { 
    transform: scale(0.98); 
}

/* Ergebnisse */
#erg { 
    margin-top: 15px; 
    padding: 15px; 
    background-color: #f8f9fa; 
    border-radius: 12px; 
    border-left: 5px solid var(--success); 
    display: none; 
}

.result-item { 
    display: flex; 
    justify-content: space-between; 
    padding: 8px 0; 
    border-bottom: 1px solid #e8e8e8; 
    font-size: 15px; 
}

.result-item:last-child { 
    border-bottom: none; 
}

.result-value { 
    font-weight: 700; 
    color: var(--primary); 
}

/* Sofia Info Box */
.info-box { 
    margin-top: 12px; 
    padding: 10px; 
    background-color: #f3e5f5; 
    border-left: 4px solid #9c27b0; 
    border-radius: 6px; 
    font-size: 13px; 
    font-weight: 500; 
    line-height: 1.4; 
}

/* Rezept Suche Styles */
.suche-input { 
    width: 100%; 
    padding: 12px; 
    border: 2px solid var(--border); 
    border-radius: 10px; 
    font-size: 15px; 
    margin-bottom: 15px; 
}

.rezept-card { 
    background: #f8f9fa; 
    border: 1px solid var(--border); 
    border-radius: 10px; 
    padding: 12px; 
    margin-bottom: 10px; 
    cursor: pointer; 
    transition: 0.2s; 
	padding: 0 !important;
    overflow: hidden;
}

.rezept-card:hover { 
    border-color: var(--primary); 
}

.rezept-card h4 { 
    color: var(--primary); 
    margin-bottom: 4px; 
}

.rezept-card p { 
    font-size: 13px; 
    color: var(--text-light); 
}

/* Disclaimer */
.disclaimer { 
    margin-top: 25px; 
    padding: 12px; 
    font-size: 11px; 
    color: var(--text-light); 
    text-align: center; 
    line-height: 1.4; 
}

/* Herz-Button Styling auf den Rezept-Karten */
.rezept-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.fav-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 10px;
    transition: transform 0.2s;
    user-select: none;
}

.fav-btn:active {
    transform: scale(1.3);
}

.rezept-card-inner {
    padding: 15px; /* Das originale Padding wandert nach innen */
    transition: transform 0.1s ease;
    user-select: none; /* Verhindert, dass Text beim schnellen Tippen markiert wird */
}

.footer-legal {
    margin-top: 30px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}

.legal-links {
    margin: 15px 0;
}

.legal-links span {
    font-size: 12px;
    color: var(--text-light);
    margin: 0 10px;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

.legal-links span:hover {
    color: var(--primary);
}

/* Die neue, unauffällige Klappbox unter den Links */
.legal-foldout-box {
    display: none;
    text-align: left;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.5;
}

.footer-credits {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.5;
    margin-top: 10px;
}