* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background: linear-gradient(145deg, #0b2b3f 0%, #1a4b6d 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.game-container {
    max-width: 480px;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 4px rgba(255, 255, 255, 0.4);
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Рыбный баланс */
.fish-balance {
    background: #07222e;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #f3c26b;
    flex-shrink: 0;
}

.balance-title {
    color: #a3d0e0;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.balance-amount {
    background: #1d5a7a;
    padding: 8px 20px;
    border-radius: 60px;
    color: #fee7b0;
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 2px solid #f3c26b;
    box-shadow: inset 0 -2px 0 #0f3b4f;
}

.balance-amount::before {
    content: "🐟";
    font-size: 1.6rem;
    filter: drop-shadow(2px 2px 0 #a65336);
}

/* Контентная область */
.content {
    flex: 1;
    background: rgba(10, 35, 45, 0.7);
    padding: 20px 10px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #f3c26b #144a5e;
}

.content::-webkit-scrollbar {
    width: 6px;
}
.content::-webkit-scrollbar-track {
    background: #144a5e;
}
.content::-webkit-scrollbar-thumb {
    background: #f3c26b;
    border-radius: 20px;
}

.section-title {
    color: #f9e3b6;
    font-size: 1.4rem;
    font-weight: 800;
    text-shadow: 3px 3px 0 #0b475a;
    margin-bottom: 20px;
    padding-left: 6px;
}

/* Горизонтальный скролл для пингвинов */
.penguin-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 6px 6px 16px 6px;
    scrollbar-width: thin;
    scrollbar-color: #f3c26b #144a5e;
    -webkit-overflow-scrolling: touch;
}

.penguin-scroll::-webkit-scrollbar {
    height: 6px;
}
.penguin-scroll::-webkit-scrollbar-track {
    background: #144a5e;
    border-radius: 20px;
}
.penguin-scroll::-webkit-scrollbar-thumb {
    background: #f3c26b;
    border-radius: 20px;
}

/* Карточка пингвина */
.penguin-card {
    flex: 0 0 280px;
    background: linear-gradient(145deg, #e8f0fe, #c0d9e8);
    border-radius: 28px;
    padding: 18px;
    border: 3px solid white;
    box-shadow: 0 10px 0 #0f4752, 0 8px 12px rgba(0,0,0,0.3);
    color: #1f3b44;
    display: flex;
    flex-direction: column;
}

.penguin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.penguin-avatar {
    font-size: 3.2rem;
    filter: drop-shadow(4px 6px 0 #969696);
}
.penguin-name {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: #16313d;
    text-shadow: 2px 2px 0 #c7d6dd;
}
.talent-badge {
    background: #3f2b1c;
    color: #fedba5;
    padding: 6px 14px;
    border-radius: 60px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    border: 2px solid #ffb347;
    margin-bottom: 8px;
    align-self: flex-start;
}

.stats {
    background: #edf7fc;
    border-radius: 20px;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #7fa9b5;
    font-size: 0.95rem;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.gear-section {
    background: #edf7fc;
    border-radius: 20px;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #7fa9b5;
}
.gear-title {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.gear-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.gear-item {
    background: #4f7a9e;
    color: white;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.gear-item button {
    background: none;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 4px;
}

.dive-button {
    background: #2ba3cc;
    border: none;
    width: 100%;
    padding: 18px;
    border-radius: 60px;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    border-bottom: 6px solid #136280;
    transition: 0.08s linear;
    margin-top: auto;
    cursor: pointer;
    box-shadow: 0 6px 0 #0d4b63, 0 8px 12px black;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dive-button:active {
    transform: translateY(5px);
    border-bottom-width: 2px;
}
.dive-button:disabled {
    opacity: 0.5;
    transform: translateY(3px);
    border-bottom-width: 3px;
    pointer-events: none;
}

.inventory-button {
    background: #4f7a9e;
    border: none;
    padding: 10px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    margin-top: 8px;
    cursor: pointer;
    border-bottom: 4px solid #1d4b6e;
}
.inventory-button:active {
    transform: translateY(3px);
    border-bottom-width: 1px;
}

/* Магазин */
.shop-item {
    background: #bde1f0;
    border-radius: 28px;
    padding: 18px;
    border: 3px solid #fff9e6;
    box-shadow: 0 10px 0 #0f4752;
    margin-bottom: 20px;
}
.shop-header {
    display: flex;
    align-items: center;
    gap: 16px;
}
.shop-emoji {
    font-size: 3.8rem;
    background: #4d2f18;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #fdcb6e;
}
.shop-details {
    flex: 1;
}
.shop-title {
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #16313d;
}
.shop-price {
    background: #0d394b;
    color: #fee7b0;
    padding: 4px 14px;
    border-radius: 60px;
    display: inline-block;
    margin: 8px 0;
    font-weight: bold;
    border: 2px solid #f3c26b;
}
.buy-button {
    background: #fed54e;
    border: none;
    padding: 12px 24px;
    border-radius: 60px;
    font-weight: 800;
    font-size: 1.2rem;
    border-bottom: 4px solid #b17f2a;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
}
.buy-button:active {
    transform: translateY(4px);
    border-bottom-width: 1px;
}
.buy-button:disabled {
    opacity: 0.5;
    transform: translateY(2px);
    border-bottom-width: 2px;
    pointer-events: none;
}

/* Инвентарь предметов */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.inventory-slot {
    aspect-ratio: 1 / 1;
    background: #173d4b;
    border: 3px solid #f3c26b;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffe5a3;
    box-shadow: inset 0 -4px 0 #0b2b35;
    position: relative;
    cursor: pointer;
    text-align: center;
    padding: 4px;
}
.inventory-slot.empty {
    opacity: 0.5;
}
.inventory-slot .remove-item {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 1rem;
    background: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Инвентарь пингвинов */
.penguin-inventory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.penguin-inventory-item {
    background: #bde1f0;
    border-radius: 20px;
    padding: 12px;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.penguin-inventory-info {
    font-weight: bold;
}
.penguin-inventory-actions {
    display: flex;
    gap: 8px;
}
.penguin-inventory-actions button {
    background: #2ba3cc;
    border: none;
    padding: 8px 12px;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    border-bottom: 3px solid #136280;
    cursor: pointer;
}
.penguin-inventory-actions button:active {
    transform: translateY(3px);
    border-bottom-width: 1px;
}

/* Профиль */
.profile-card {
    background: #173d4b;
    border-radius: 40px;
    padding: 20px;
    border: 3px solid #ffe5a3;
    color: white;
}
.profile-field {
    margin-bottom: 16px;
}
.profile-field label {
    display: block;
    margin-bottom: 4px;
}
.profile-field input {
    width: 100%;
    padding: 12px;
    border-radius: 60px;
    border: none;
    font-size: 1rem;
}
.leaderboard {
    margin-top: 20px;
    background: #0d394b;
    border-radius: 30px;
    padding: 16px;
}
.leaderboard table {
    width: 100%;
    color: white;
    border-collapse: collapse;
}
.leaderboard td {
    padding: 8px;
    border-bottom: 1px solid #f3c26b;
}

/* Нижнее меню */
.bottom-nav {
    background: #05222e;
    display: flex;
    justify-content: space-around;
    padding: 10px 0 16px;
    border-top: 4px solid #f3c26b;
    box-shadow: 0 -4px 0 #115067;
    flex-shrink: 0;
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #98c1d9;
    font-weight: 600;
    font-size: 0.9rem;
    gap: 4px;
    padding: 8px 18px;
    border-radius: 60px;
    transition: 0.1s;
    cursor: pointer;
    border: 2px solid transparent;
}
.nav-btn.active {
    background: #184e64;
    color: #fee7b0;
    border-color: #f3c26b;
    transform: translateY(-4px);
}
.nav-emoji {
    font-size: 2rem;
    filter: drop-shadow(2px 4px 0 #0b2b35);
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #1d5a7a;
    padding: 24px;
    border-radius: 40px;
    border: 4px solid #f3c26b;
    max-width: 300px;
    width: 90%;
}
.modal-content select, .modal-content button {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 60px;
    border: none;
    font-weight: bold;
}
.modal-content button {
    background: #fed54e;
    border-bottom: 4px solid #b17f2a;
}