body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #f5f5f5;
    color: #222;
    min-height: 100vh;
    padding-top: 56px;
    box-sizing: border-box;
}

.container {
    background: #fff;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 320px;
    margin: 2.5rem auto 0;
}

.num {
    display: inline-block;
    min-width: 3.5ch;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.hidden {
    display: none !important;
}

#auth-panel {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 220px;
}

#auth-panel input {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.auth-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.auth-tab {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    background: #eee;
    color: #666;
    font-weight: bold;
    cursor: pointer;
}

.auth-tab.active {
    background: #2196f3;
    color: #fff;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

#login-btn,
#register-btn {
    padding: 0.6rem 0.8rem;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
}

#login-btn {
    background: #2196f3;
}

#register-btn {
    background: #4caf50;
}

.verify-hint {
    font-size: 0.85rem;
    color: #2196f3;
}

.verify-hint a {
    color: #2196f3;
    font-weight: bold;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 100;
    box-sizing: border-box;
}

.nav-brand {
    font-weight: bold;
    color: #2196f3;
}

.nav-profile {
    position: relative;
}

.profile-btn {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 20px;
    background: #f0f0f0;
    font-weight: bold;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: 130%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 0.9rem 1.1rem;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 101;
    text-align: left;
}

.profile-stat {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: #555;
}

.profile-dropdown .logout-btn {
    margin-top: 0.4rem;
    text-align: center;
}

.admin-shortcut-btn {
    margin-top: 0.4rem;
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 6px;
    background: #ff9800;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
}

.logout-btn {
    padding: 0.2rem 0.6rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #999;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.game-layout {
    width: clamp(600px, 92vw, 1400px);
    margin: 2rem auto 0;
    box-sizing: border-box;
}

.coins-bar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.game-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.game-column {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.25rem 1.5rem;
    box-sizing: border-box;
}

h2 {
    font-size: 1rem;
    text-align: left;
    margin: 0 0 0.75rem;
    color: #555;
}

.market {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
}

.market-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.9rem;
    background: #f0f0f0;
    border-radius: 6px;
    gap: 0.75rem;
    min-height: 68px;
    box-sizing: border-box;
}

.market-info {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    min-width: 0;
}

.market-info strong {
    font-size: 1rem;
}

.market-info span {
    color: #666;
}

.market-info .pending {
    color: #ff9800;
    font-weight: bold;
}

.market-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.market-actions button {
    width: 110px;
    padding: 0.5rem 0.4rem;
    border: none;
    border-radius: 6px;
    background: #2196f3;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    box-sizing: border-box;
}

.buy-btn {
    background: #4caf50 !important;
}

.sell-btn {
    background: #ff5722 !important;
}

.market-actions button:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

.produkt-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    background: #f0f0f0;
    border-radius: 6px;
}

.produkt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.produkt-header strong {
    font-size: 1rem;
}

.produkt-header .pending {
    color: #ff9800;
    font-weight: bold;
    font-size: 0.8rem;
}

.produkt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    gap: 0.75rem;
}

.produkt-row .zutaten-list {
    text-align: right;
}

.zutat-missing {
    color: #d32f2f;
    font-weight: bold;
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qty-stepper button {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 4px;
    background: #ddd;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.qty-value {
    min-width: 2.5ch;
    text-align: center;
    font-weight: bold;
}

.reset-btn {
    margin-top: 1.5rem;
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #999;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 200;
    max-width: 90vw;
    text-align: center;
    color: #fff;
}

.toast-error {
    background: #d32f2f;
}

.toast-info {
    background: #2196f3;
}

.dev-badge {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: #ff9800;
    color: #fff;
    font-family: system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.admin-container {
    min-width: 600px;
    max-width: 900px;
    text-align: left;
}

#admin-login-panel {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 260px;
    margin: 0 auto;
}

#admin-login-panel input {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

#admin-login-btn {
    padding: 0.6rem 0.8rem;
    border: none;
    border-radius: 6px;
    background: #2196f3;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.admin-logout {
    float: right;
}

.admin-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0 2rem;
    clear: both;
}

.stat-box {
    flex: 1;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-box strong {
    display: block;
    font-size: 1.6rem;
}

.stat-box span {
    font-size: 0.8rem;
    color: #666;
}

.admin-section {
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: #222;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.admin-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.9rem;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.delete-btn {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 6px;
    background: #d32f2f;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
}

.admin-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.admin-form input {
    padding: 0.5rem 0.7rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.admin-form button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: #4caf50;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

#produkt-zutaten {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.zutat-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.zutat-row input {
    width: 80px;
}

#add-zutat-btn {
    background: #999;
}

.user-row {
    flex-direction: column;
    align-items: stretch;
    background: transparent;
    padding: 0;
}

.user-name-btn {
    text-align: left;
    padding: 0.5rem 0.9rem;
    border: none;
    border-radius: 6px;
    background: #f0f0f0;
    font-weight: bold;
    cursor: pointer;
}

.user-details {
    padding: 0.6rem 0.9rem;
    background: #e8e8e8;
    border-radius: 0 0 6px 6px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

#user-search {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}
