body {
    padding-bottom: 50px;
    background-color: #f5f5f5;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

body.buying-mode {
    background-color: #79bd7f;
}

body.buying-mode h1,
body.buying-mode h6 {
    color: #155724;
}

body.selling-mode {
    background-color: #db6d6d;
}

body.selling-mode h1,
body.selling-mode h6 {
    color: white;
}

body.bonus-mode {
    background-color: #c7b5ec;
}

body.bonus-mode h1,
body.bonus-mode h6 {
    color: #2f235a;
}

.nav-buttons-container {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
    position: relative;
}

.nav-buttons-container h1,
.app-shell-title {
    grid-column: 2;
    margin: 0;
}

.app-shell-home {
    grid-column: 1;
    justify-self: start;
}

.app-shell-tools {
    grid-column: 3;
    justify-self: end;
    position: relative;
    z-index: 20;
}

.app-shell-tools-toggle {
    display: inline-block;
    list-style: none;
}

.app-shell-tools-toggle::-webkit-details-marker {
    display: none;
}

.app-shell-tools-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    display: flex;
    min-width: 190px;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.35rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.app-shell-menu-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    color: #212529;
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    text-align: left;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.25;
    cursor: pointer;
}

.app-shell-menu-item:hover,
.app-shell-menu-item:focus {
    color: #fff;
    background: #6c757d;
}

.nav-link-custom {
    padding: 0.5rem 1rem;
    color: #fff;
    background-color: #6c757d;
    border-radius: 0.25rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
}

.nav-link-custom:hover {
    background-color: #5a6268;
    color: #fff;
}

.mode-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.mode-btn {
    flex: 1;
    min-width: 140px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: 3px solid transparent;
    transition: all 0.3s;
    opacity: 0.4;
    filter: grayscale(70%);
    cursor: pointer;
}

.mode-btn:hover {
    opacity: 0.6;
}

.mode-btn.active {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.mode-btn.buying {
    background-color: #28a745;
    color: white;
    border-color: #1e7e34;
}

.mode-btn.buying.active {
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.8);
    border-color: #28a745;
}

.mode-btn.selling {
    background-color: #dc3545;
    color: white;
    border-color: #bd2130;
}

.mode-btn.selling.active {
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.8);
    border-color: #dc3545;
}

.mode-btn.bonus {
    background-color: #B39DDB;
    color: #000;
    border-color: #9575CD;
}

.mode-btn.bonus.active {
    box-shadow: 0 0 20px rgba(179, 157, 219, 0.8);
    border-color: #B39DDB;
}

@media (max-width: 768px) {
    body {
        font-size: 12px;
    }

    .mode-btn {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .nav-buttons-container {
        grid-template-columns: minmax(58px, 1fr) auto minmax(58px, 1fr);
        gap: 0.35rem;
    }

    .app-shell-title {
        font-size: 1.35rem;
        white-space: nowrap;
    }

    .nav-link-custom {
        padding: 0.4rem 0.65rem;
    }
}
