/* ============================================
   FISHING MASTER - Professional Game Styles
   ============================================ */

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #0a1628;
    --bg-secondary: #132238;
    --bg-tertiary: #1a2d47;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    --accent-primary: #00d4ff;
    --accent-secondary: #0099cc;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    
    --gold: #ffd700;
    --gold-gradient: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #ef4444;
    
    /* Rarity Colors */
    --rarity-common: #9ca3af;
    --rarity-uncommon: #4ade80;
    --rarity-rare: #3b82f6;
    --rarity-epic: #a855f7;
    --rarity-legendary: #f97316;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Safe areas - правильные отступы для Telegram Web App */
    --safe-top: max(env(safe-area-inset-top, 0px), 60px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --telegram-header-height: 60px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal overflow for media elements */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100vw;
    position: fixed; /* Prevent body scrolling */
    top: 0;
    left: 0;
    overscroll-behavior: none; /* Prevent pull-to-refresh and overscroll */
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    overflow-x: hidden;
    max-width: 100vw;
    position: fixed; /* Prevent body scrolling */
    overscroll-behavior: none; /* Prevent pull-to-refresh */
    overscroll-behavior-y: none;
}

#app {
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    position: fixed; /* Prevent app scrolling */
    top: 0;
    left: 0;
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
    overscroll-behavior: none; /* Prevent pull-to-refresh */
    overscroll-behavior-y: none;
}

/* ============================================
   Screens
   ============================================ */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    max-width: 100vw;
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
    overflow-x: hidden;
    overflow-y: hidden; /* Prevent screen-level scrolling */
    box-sizing: border-box;
    pointer-events: none; /* Disable pointer events when hidden */
    overscroll-behavior: none; /* Prevent pull-to-refresh */
    overscroll-behavior-y: none;
}

.screen.active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto; /* Enable pointer events when active */
}

/* ============================================
   Loading Screen
   ============================================ */
#loading-screen {
    background: linear-gradient(180deg, #1a3a5c 0%, #0a1628 100%);
    justify-content: center;
    align-items: center;
}

.loading-content {
    text-align: center;
    padding: var(--spacing-xl);
}

.loading-logo {
    position: relative;
    width: 150px;
    height: 100px;
    margin: 0 auto var(--spacing-xl);
}

.logo-fish {
    animation: fishSwim 3s ease-in-out infinite;
}

.fish-svg {
    width: 100px;
    height: 60px;
}

.fish-body {
    fill: var(--accent-primary);
    filter: drop-shadow(0 0 10px var(--accent-primary));
}

.fish-eye {
    fill: white;
}

.fish-pupil {
    fill: #333;
}

.fish-fin {
    fill: var(--accent-secondary);
}

.logo-hook {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    animation: hookDangle 2s ease-in-out infinite;
}

.hook-svg {
    width: 30px;
    height: 60px;
}

.loading-title {
    font-size: 32px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xl);
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.loading-bar {
    width: 200px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    margin: 0 auto var(--spacing-md);
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
}

@keyframes fishSwim {
    0%, 100% { transform: translateX(-10px) rotate(-5deg); }
    50% { transform: translateX(10px) rotate(5deg); }
}

@keyframes hookDangle {
    0%, 100% { transform: translateX(-50%) rotate(-5deg); }
    50% { transform: translateX(-50%) rotate(5deg); }
}

/* ============================================
   Main Menu
   ============================================ */
#main-menu {
    background: var(--bg-primary);
    /* Легкий градиент для глубины */
    background-image: linear-gradient(180deg, rgba(26, 74, 110, 0.3) 0%, transparent 40%, var(--bg-primary) 100%);
}

.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    overflow: hidden;
    pointer-events: none;
}

.parallax-layer {
    position: absolute;
    left: 0;
    right: 0;
    background-size: cover;
    background-position: center;
}

.parallax-layer.mountains {
    top: 0;
    height: 60%;
    background: linear-gradient(180deg, transparent 0%, #1a3d5c 100%);
    opacity: 0.5;
}

.parallax-layer.trees {
    top: 30%;
    height: 40%;
    background: linear-gradient(180deg, transparent 0%, #0d2840 100%);
}

.parallax-layer.water-bg {
    bottom: 0;
    height: 30%;
    background: linear-gradient(180deg, #1a4a6e 0%, #0d3050 100%);
}

.menu-header {
    position: relative;
    z-index: 10;
    padding-top: calc(var(--safe-top) + var(--spacing-lg));
    padding-right: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
    padding-left: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    background: transparent;
    /* Мягкая тень для разделения */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.player-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    padding: var(--spacing-md);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Мягкая профессиональная тень */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.player-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* Позволяет сжиматься */
    flex: 1;
}

.player-name {
    font-weight: 700;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    color: var(--text-primary);
    line-height: 1.2;
}

.player-level-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
    margin-top: 4px;
}

.level-badge {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-primary);
}

.exp-bar {
    flex: 1;
    min-width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.exp-fill {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width var(--transition-normal);
}

.currency-display {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    width: 100%;
    justify-content: flex-end;
}

.currency-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    /* Профессиональная мягкая тень */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-fast);
}

.currency-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.08);
}

.currency-item.gold {
    border-color: rgba(255, 215, 0, 0.3);
}

.currency-item.bolts {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.1);
}

.currency-icon {
    font-size: 18px;
}

.menu-content {
    flex: 1;
    min-height: 0; /* Critical for flex scrolling */
    position: relative;
    z-index: 10;
    padding: var(--spacing-md);
    padding-top: var(--spacing-lg);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-lg));
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overscroll-behavior: contain; /* Prevent pull-to-refresh on this element */
    overscroll-behavior-y: contain;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.stat-box {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Профессиональная мягкая тень */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-fast);
}

.stat-box:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.06);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    color: var(--text-primary);
    /* Профессиональная мягкая тень */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.menu-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.menu-btn.primary {
    background: var(--accent-gradient);
    border: none;
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.4), 0 2px 8px rgba(0, 212, 255, 0.2);
}

.menu-btn.primary:active {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.menu-btn.primary .btn-icon {
    background: rgba(255, 255, 255, 0.2);
}

.btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.btn-title {
    font-weight: 700;
    font-size: 16px;
}

.btn-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.menu-btn.primary .btn-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.btn-arrow {
    font-size: 24px;
    color: var(--text-muted);
}

.menu-btn.primary .btn-arrow {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Screen Header
   ============================================ */
.screen-header {
    display: flex;
    align-items: center;
    padding-top: calc(var(--safe-top) + var(--spacing-md));
    padding-right: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0; /* Prevent header from shrinking */
    position: relative;
    z-index: 100;
    gap: var(--spacing-sm);
    /* Красивая мягкая тень под header */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Скрываем кнопки "Назад" в экранах, так как используем нативную кнопку Telegram */
.screen-header .back-btn {
    display: none !important;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.back-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.back-btn:active {
    transform: scale(0.95);
    background: var(--bg-card-hover);
}

.screen-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    padding: 0 var(--spacing-sm);
    min-width: 0; /* Позволяет тексту сжиматься */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-currency {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-shrink: 0; /* Не сжимается */
}

.coins-display {
    background: var(--bg-card);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    /* Правильная мягкая тень вместо полоски */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Location Screen
   ============================================ */
#location-screen {
    background: var(--bg-primary);
}

.locations-container {
    flex: 1;
    min-height: 0; /* Critical for flex scrolling - allows container to shrink below content size */
    padding: var(--spacing-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-lg));
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overscroll-behavior: contain; /* Prevent pull-to-refresh */
    overscroll-behavior-y: contain;
}

.location-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.location-card:active {
    transform: scale(0.98);
}

.location-card.locked {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.location-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.location-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.location-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
}

.location-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.location-icon {
    font-size: 28px;
}

.location-name {
    font-size: 18px;
    font-weight: 700;
}

.location-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.location-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.location-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
}

.location-tag.fish {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-primary);
}

.location-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.lock-icon {
    font-size: 40px;
    margin-bottom: var(--spacing-sm);
}

.lock-req {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   New Location Cards Design
   ============================================ */
.loc-card {
    position: relative;
    min-height: 100px; /* Changed from fixed height to min-height */
    height: auto; /* Allow card to grow if needed */
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    flex-shrink: 0; /* Prevent cards from shrinking */
}

.loc-card:active {
    transform: scale(0.98);
}

.loc-card.selected {
    box-shadow: 0 0 0 3px var(--accent-primary), 0 4px 20px rgba(0, 212, 255, 0.4);
}

.loc-card.locked {
    cursor: default;
    min-height: 95px; /* Slightly smaller but still readable */
}

.loc-card.locked:has(.loc-unlock-btn) {
    cursor: pointer;
}

.loc-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.loc-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

.loc-card-overlay.locked {
    background: rgba(0, 0, 0, 0.5);
}

.loc-card-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 14px 16px; /* Fixed padding for consistency */
    min-height: 100px; /* Match card min-height */
    box-sizing: border-box;
}

.loc-card-icon {
    font-size: 42px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(5px);
}

.loc-card-icon.locked {
    background: rgba(0, 0, 0, 0.4);
    font-size: 28px;
}

.loc-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.loc-card-name {
    font-size: 17px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loc-card-meta {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.loc-meta-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(3px);
}

.loc-card-badges {
    position: absolute;
    bottom: 10px;
    right: 12px;
    display: flex;
    gap: 6px;
}

.loc-badge {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.loc-badge.legendary {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.6), rgba(234, 179, 8, 0.6));
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.loc-badge.epic {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.6), rgba(139, 92, 246, 0.6));
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

/* Locked location styles */
.loc-card-req {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.req-level, .req-cost {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
}

.req-level.met, .req-cost.met {
    color: var(--success);
    background: rgba(74, 222, 128, 0.2);
}

.req-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
}

.loc-unlock-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--success), #22c55e);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 10px rgba(74, 222, 128, 0.4);
    flex-shrink: 0;
}

.loc-unlock-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.6);
}

.loc-unlock-btn:active {
    transform: scale(0.95);
}

/* ============================================
   Fishing Screen
   ============================================ */
#fishing-screen {
    background: var(--bg-primary);
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fishing-header {
    display: flex;
    align-items: center;
    padding-top: calc(var(--safe-top) + var(--spacing-xs));
    padding-right: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    padding-left: var(--spacing-md);
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* Скрываем кнопку "Назад" в fishing-header, используем нативную */
.fishing-header .back-btn {
    display: none !important;
}

.fishing-header .back-btn {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.location-info {
    flex: 1;
    text-align: center;
}

.location-info .location-name {
    display: block;
    font-weight: 700;
    font-size: 16px;
}

.weather-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.fishing-header .coins-display {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.fishing-scene {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0; /* Allow flexbox to shrink */
    display: flex;
    flex-direction: column;
}

/* Sky */
.sky-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(180deg, #4a90c2 0%, #87ceeb 50%, #a8d8ea 100%);
}

.sun {
    position: absolute;
    top: 20px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #fff9c4 0%, #ffeb3b 40%, #ff9800 100%);
    border-radius: 50%;
    box-shadow: 0 0 60px #ffeb3b, 0 0 100px rgba(255, 235, 59, 0.5);
    animation: sunPulse 4s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 60px #ffeb3b, 0 0 100px rgba(255, 235, 59, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 80px #ffeb3b, 0 0 120px rgba(255, 235, 59, 0.6); }
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    opacity: 0.9;
    filter: blur(1px);
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-1 {
    width: 80px;
    height: 30px;
    top: 30px;
    left: 10%;
    animation: cloudMove 40s linear infinite;
}

.cloud-1::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 15px;
}

.cloud-1::after {
    width: 30px;
    height: 30px;
    top: -10px;
    left: 45px;
}

.cloud-2 {
    width: 100px;
    height: 35px;
    top: 50px;
    left: 60%;
    animation: cloudMove 50s linear infinite;
}

.cloud-2::before {
    width: 50px;
    height: 45px;
    top: -25px;
    left: 20px;
}

.cloud-2::after {
    width: 35px;
    height: 35px;
    top: -15px;
    left: 55px;
}

.cloud-3 {
    width: 60px;
    height: 25px;
    top: 70px;
    left: 35%;
    animation: cloudMove 35s linear infinite;
}

.cloud-3::before {
    width: 30px;
    height: 30px;
    top: -15px;
    left: 10px;
}

@keyframes cloudMove {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

/* Storm Clouds */
.storm-cloud {
    position: absolute;
    width: 120px;
    height: 50px;
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 100%);
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.5s;
}

.storm-cloud::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 40px;
    background: #3a3a4a;
    border-radius: 50%;
    top: -20px;
    left: 30px;
}

.storm-cloud-1 {
    top: 3%;
    left: 10%;
    animation: stormCloudMove 15s linear infinite;
}

.storm-cloud-2 {
    top: 5%;
    left: 60%;
    animation: stormCloudMove 18s linear infinite reverse;
}

@keyframes stormCloudMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(30px); }
}

/* Weather Effects */
.weather-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 15;
}

/* Rain */
.rain-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s;
}

.rain-drop {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(180deg, transparent, rgba(174, 194, 224, 0.6));
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    0% { transform: translateY(-20px); }
    100% { transform: translateY(100vh); }
}

/* Heavy Rain for Storm */
.rain-container.heavy .rain-drop {
    height: 25px;
    background: linear-gradient(180deg, transparent, rgba(174, 194, 224, 0.8));
}

/* Rain drops on water surface */
.rain-drops {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s;
}

.rain-splash {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: rainSplash 1s ease-out infinite;
}

@keyframes rainSplash {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* Fog */
.fog-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(200, 200, 210, 0.3) 0%, 
        rgba(180, 180, 190, 0.5) 30%,
        rgba(160, 160, 170, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.5s;
}

/* Lightning */
.lightning {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.lightning.flash {
    animation: lightningFlash 0.2s ease-out;
}

@keyframes lightningFlash {
    0% { opacity: 0.9; }
    20% { opacity: 0; }
    40% { opacity: 0.7; }
    100% { opacity: 0; }
}

/* Sun styling */
.sun {
    transition: opacity 0.5s, filter 0.5s;
}

.moon {
    position: absolute;
    top: 8%;
    left: 15%;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #f0f0f0, #d0d0d0);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s;
    box-shadow: 0 0 20px rgba(255, 255, 200, 0.3);
}

/* Weather states for sky */
.sky-layer.sunny .sun { opacity: 1; filter: none; }
.sky-layer.sunny .cloud { opacity: 0.3; }

.sky-layer.cloudy .sun { opacity: 0.4; filter: brightness(0.7); }
.sky-layer.cloudy .cloud { opacity: 0.9; }

.sky-layer.rainy .sun { opacity: 0; }
.sky-layer.rainy .cloud { opacity: 1; background: #6a7a8a; }

.sky-layer.foggy .sun { opacity: 0.2; filter: blur(3px); }
.sky-layer.foggy .cloud { opacity: 0.5; }

.sky-layer.stormy .sun { opacity: 0; }
.sky-layer.stormy .storm-cloud { opacity: 1; }
.sky-layer.stormy .cloud { opacity: 0; }

/* Water changes with weather */
.water-layer.stormy .water-surface {
    animation: stormyWater 0.5s ease-in-out infinite;
}

@keyframes stormyWater {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.water-layer.rainy .water-surface::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: rgba(100, 120, 140, 0.2);
}

/* Background */
.background-layer {
    position: absolute;
    top: 15%;
    left: 0;
    right: 0;
    height: 25%;
}

.mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, #2d5a4a 0%, #1a3d3a 100%);
    clip-path: polygon(0% 100%, 10% 60%, 20% 80%, 35% 40%, 50% 70%, 65% 30%, 80% 60%, 90% 45%, 100% 70%, 100% 100%);
}

.forest {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, #1a4a35 0%, #0d2818 100%);
    clip-path: polygon(0% 100%, 5% 50%, 10% 70%, 15% 40%, 20% 60%, 25% 30%, 30% 55%, 35% 35%, 40% 50%, 45% 25%, 50% 45%, 55% 30%, 60% 50%, 65% 35%, 70% 55%, 75% 40%, 80% 60%, 85% 45%, 90% 65%, 95% 50%, 100% 70%, 100% 100%);
}

/* ===== ВРЕМЯ СУТОК ===== */
.fishing-scene.nighttime::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: 
        radial-gradient(1px 1px at 10% 10%, white, transparent),
        radial-gradient(1px 1px at 20% 25%, white, transparent),
        radial-gradient(1.5px 1.5px at 30% 5%, white, transparent),
        radial-gradient(1px 1px at 40% 20%, white, transparent),
        radial-gradient(1.5px 1.5px at 50% 8%, white, transparent),
        radial-gradient(1px 1px at 60% 30%, white, transparent),
        radial-gradient(1px 1px at 70% 12%, white, transparent),
        radial-gradient(1.5px 1.5px at 80% 22%, white, transparent),
        radial-gradient(1px 1px at 90% 15%, white, transparent),
        radial-gradient(1px 1px at 15% 35%, white, transparent),
        radial-gradient(1px 1px at 85% 8%, white, transparent);
    z-index: 1;
    pointer-events: none;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Луна ночью */
.fishing-scene.nighttime .sky-layer::after {
    content: '🌙';
    position: absolute;
    top: 10%;
    right: 15%;
    font-size: 40px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 200, 0.5));
    z-index: 2;
}

/* ===== СЕЗОНЫ ===== */
/* Весна - цветущие деревья */
.fishing-scene.season-spring .forest::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40%;
    background: 
        radial-gradient(3px 3px at 10% 30%, #FFB7C5, transparent),
        radial-gradient(4px 4px at 25% 20%, #FFC0CB, transparent),
        radial-gradient(3px 3px at 40% 35%, #FFB7C5, transparent),
        radial-gradient(4px 4px at 55% 25%, #FFC0CB, transparent),
        radial-gradient(3px 3px at 70% 30%, #FFB7C5, transparent),
        radial-gradient(4px 4px at 85% 20%, #FFC0CB, transparent);
    pointer-events: none;
}

/* Лето - яркие цвета (по умолчанию) */
.fishing-scene.season-summer .sky-layer {
    filter: saturate(1.1) brightness(1.05);
}

/* Осень - золотые листья */
.fishing-scene.season-autumn .forest {
    background: linear-gradient(180deg, #8B4513 0%, #D2691E 30%, #CD853F 60%, #8B4513 100%) !important;
}

.fishing-scene.season-autumn .forest::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(4px 4px at 5% 40%, #FFD700, transparent),
        radial-gradient(3px 3px at 15% 30%, #FFA500, transparent),
        radial-gradient(4px 4px at 25% 50%, #FF8C00, transparent),
        radial-gradient(3px 3px at 35% 35%, #FFD700, transparent),
        radial-gradient(4px 4px at 45% 45%, #FFA500, transparent),
        radial-gradient(3px 3px at 55% 30%, #FF8C00, transparent),
        radial-gradient(4px 4px at 65% 55%, #FFD700, transparent),
        radial-gradient(3px 3px at 75% 40%, #FFA500, transparent),
        radial-gradient(4px 4px at 85% 35%, #FF8C00, transparent),
        radial-gradient(3px 3px at 95% 50%, #FFD700, transparent);
    pointer-events: none;
    animation: fallingLeaves 10s linear infinite;
}

@keyframes fallingLeaves {
    0% { transform: translateY(-5px); }
    100% { transform: translateY(5px); }
}

/* Зима - снег */
.fishing-scene.season-winter .sky-layer {
    background: linear-gradient(180deg, #B0C4DE 0%, #D3D3D3 50%, #E8E8E8 100%) !important;
}

.fishing-scene.season-winter .mountains {
    background: linear-gradient(180deg, #FFFFFF 0%, #E8E8E8 40%, #D0D0D0 100%) !important;
}

.fishing-scene.season-winter .forest {
    background: linear-gradient(180deg, #2F4F4F 0%, #1C3030 50%, #0F2020 100%) !important;
}

/* Снежинки */
.fishing-scene.season-winter::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: 
        radial-gradient(2px 2px at 10% 20%, white, transparent),
        radial-gradient(2px 2px at 20% 40%, white, transparent),
        radial-gradient(3px 3px at 30% 15%, white, transparent),
        radial-gradient(2px 2px at 40% 35%, white, transparent),
        radial-gradient(2px 2px at 50% 25%, white, transparent),
        radial-gradient(3px 3px at 60% 45%, white, transparent),
        radial-gradient(2px 2px at 70% 20%, white, transparent),
        radial-gradient(2px 2px at 80% 40%, white, transparent),
        radial-gradient(3px 3px at 90% 30%, white, transparent);
    pointer-events: none;
    z-index: 5;
    animation: snowfall 8s linear infinite;
}

@keyframes snowfall {
    0% { transform: translateY(-10px); opacity: 0.8; }
    100% { transform: translateY(20px); opacity: 0.4; }
}

/* Замёрзшая вода зимой */
.fishing-scene.season-winter .water-surface {
    background: linear-gradient(180deg, 
        rgba(200, 220, 240, 0.9) 0%, 
        rgba(180, 200, 220, 0.8) 100%) !important;
}

/* ===== ЛОКАЦИЯ: ОЗЕРО (по умолчанию) ===== */
.fishing-scene.location-lake .sky-layer {
    background: linear-gradient(180deg, #87CEEB 0%, #98D8E8 50%, #B8E6F0 100%);
}
.fishing-scene.location-lake .mountains {
    background: linear-gradient(135deg, #2d5a4a 0%, #1a3d3a 100%);
}
.fishing-scene.location-lake .forest {
    background: linear-gradient(180deg, #1a4a35 0%, #0d2818 100%);
}
.fishing-scene.location-lake .water-surface {
    background: linear-gradient(180deg, rgba(74, 144, 217, 0.8) 0%, #2e5a8a 100%);
}
.fishing-scene.location-lake .water-depth {
    background: linear-gradient(180deg, #2e5a8a 0%, #1a3d5c 30%, #0d2840 60%, #061420 100%);
}

/* ===== ЛОКАЦИЯ: ГОРНАЯ РЕКА ===== */
.fishing-scene.location-river .sky-layer {
    background: linear-gradient(180deg, 
        #4A90C2 0%, 
        #6AAED6 40%, 
        #8CC4E4 70%, 
        #B5D9ED 100%);
}

/* Горы с заснеженными вершинами */
.fishing-scene.location-river .mountains {
    height: 100%;
    background: 
        /* Дальняя гора слева */
        linear-gradient(160deg, #E8EEF2 0%, #B8C8D4 25%, #5A7A8A 50%, #3D5A6A 100%);
    clip-path: polygon(
        0% 100%,
        0% 45%,
        12% 25%,
        25% 50%,
        35% 20%,
        50% 45%,
        62% 15%,
        75% 40%,
        88% 30%,
        100% 55%,
        100% 100%
    );
}

/* Ближние горы/холмы с лесом */
.fishing-scene.location-river .forest {
    height: 70%;
    background: linear-gradient(180deg, 
        #2D4A3D 0%, 
        #1F3A2F 40%, 
        #152D23 100%);
    clip-path: polygon(
        0% 100%,
        0% 50%,
        8% 40%,
        18% 55%,
        28% 35%,
        40% 50%,
        52% 30%,
        65% 45%,
        78% 35%,
        90% 50%,
        100% 40%,
        100% 100%
    );
}

/* Скалистый берег */
.fishing-scene.location-river .forest::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(180deg, 
        #4A5550 0%, 
        #3A4540 60%, 
        #2A3530 100%);
    clip-path: polygon(
        0% 100%,
        0% 40%,
        10% 55%,
        25% 35%,
        40% 50%,
        55% 30%,
        70% 45%,
        85% 35%,
        100% 50%,
        100% 100%
    );
}

/* Чистая горная вода - изумрудный оттенок */
.fishing-scene.location-river .water-surface {
    background: linear-gradient(180deg, 
        #4A9BA8 0%, 
        #3A8A98 100%);
}

.fishing-scene.location-river .water-depth {
    background: linear-gradient(180deg, 
        #3A8A98 0%, 
        #2A6A78 20%, 
        #1A5058 45%, 
        #0A3540 70%,
        #052028 100%);
}

/* Лёгкое течение - горизонтальные блики */
.fishing-scene.location-river .water-surface::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.08) 20%,
        transparent 40%,
        rgba(255,255,255,0.06) 60%,
        transparent 80%,
        rgba(255,255,255,0.08) 100%
    );
    animation: riverShimmer 8s ease-in-out infinite;
}

@keyframes riverShimmer {
    0%, 100% { opacity: 0.6; transform: translateX(-5%); }
    50% { opacity: 1; transform: translateX(5%); }
}

/* ===== ЛОКАЦИЯ: МОРЕ ===== */
.fishing-scene.location-sea .sky-layer {
    background: linear-gradient(180deg, #1E90FF 0%, #4DA6FF 40%, #87CEEB 80%, #FFE4B5 100%);
}
.fishing-scene.location-sea .background-layer {
    height: 10%;
    top: 25%;
}
.fishing-scene.location-sea .mountains {
    display: none;
}
.fishing-scene.location-sea .forest {
    display: none;
}
/* Горизонт моря */
.fishing-scene.location-sea .background-layer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a5a8a, #2e7aaa, #1a5a8a);
}
.fishing-scene.location-sea .water-layer {
    top: 32%;
}
.fishing-scene.location-sea .water-surface {
    background: linear-gradient(180deg, rgba(30, 100, 160, 0.9) 0%, #1a5a8a 100%);
    height: 20%;
}
.fishing-scene.location-sea .water-depth {
    top: 20%;
    background: linear-gradient(180deg, #1a5a8a 0%, #0d3d5c 20%, #072840 50%, #031525 100%);
}
/* Волны моря */
.fishing-scene.location-sea .water-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: 
        repeating-linear-gradient(90deg,
            transparent 0px,
            rgba(255,255,255,0.15) 30px,
            transparent 60px);
    animation: seaWaves 4s ease-in-out infinite;
}
@keyframes seaWaves {
    0%, 100% { transform: translateX(0) scaleY(1); }
    50% { transform: translateX(-20px) scaleY(1.1); }
}
/* Корабль на горизонте - плывёт вправо */
.fishing-scene.location-sea .background-layer::before {
    content: '⛵';
    position: absolute;
    bottom: 5px;
    font-size: 20px;
    transform: scaleX(-1); /* Зеркалим чтобы плыл вправо */
    animation: shipFloat 30s linear infinite;
}
@keyframes shipFloat {
    0% { left: -30px; }
    100% { left: 100%; }
}

/* ============================================
   SWAMP - Тёмное болото
   ============================================ */
.fishing-scene.location-swamp .sky-layer {
    background: linear-gradient(180deg, 
        #1a1f0a 0%, 
        #2d3a1f 25%, 
        #4a5a30 50%, 
        #6a7a45 75%, 
        #8a9a60 100%);
}

.fishing-scene.location-swamp .background-layer {
    height: 25%;
    top: 28%;
    background: none;
}

.fishing-scene.location-swamp .mountains { display: none; }
.fishing-scene.location-swamp .forest { display: none; }

/* Мрачные деревья болота */
.fishing-scene.location-swamp .background-layer::before {
    content: '🌳🌲🌳🌲🌳🌲';
    position: absolute;
    bottom: 0;
    left: 5%;
    font-size: 35px;
    filter: brightness(0.4) saturate(0.6);
    letter-spacing: 10px;
}

.fishing-scene.location-swamp .background-layer::after {
    content: '🐊';
    position: absolute;
    bottom: -15px;
    right: 15%;
    font-size: 28px;
    animation: gatorFloat 8s ease-in-out infinite;
}

@keyframes gatorFloat {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    25% { transform: translateY(-3px); }
    50% { transform: translateY(0); opacity: 0.9; }
    75% { transform: translateY(-2px); }
}

.fishing-scene.location-swamp .water-layer { top: 50%; }

.fishing-scene.location-swamp .water-surface {
    background: linear-gradient(180deg, 
        rgba(60, 80, 30, 0.95) 0%, 
        #3a5020 50%,
        #2a4010 100%);
    height: 18%;
}

.fishing-scene.location-swamp .water-depth {
    top: 18%;
    background: linear-gradient(180deg, 
        #2a4010 0%, 
        #1a3005 25%, 
        #0f2000 50%, 
        #051000 100%);
}

/* Ряска на воде */
.fishing-scene.location-swamp .water-surface::before {
    content: '🌿 🍃 🌿 🍃 🌿';
    position: absolute;
    top: 5px;
    left: 10%;
    font-size: 12px;
    letter-spacing: 20px;
    opacity: 0.6;
    animation: duckweedFloat 10s ease-in-out infinite;
}

@keyframes duckweedFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(15px); }
}

/* Туман над болотом */
.fishing-scene.location-swamp::after {
    content: '';
    position: absolute;
    top: 35%;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(120, 140, 100, 0.3) 30%,
        rgba(100, 120, 80, 0.4) 50%,
        rgba(120, 140, 100, 0.3) 70%,
        transparent 100%);
    animation: swampFog 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes swampFog {
    0%, 100% { opacity: 0.4; transform: translateX(-3%); }
    50% { opacity: 0.7; transform: translateX(3%); }
}

/* ============================================
   TROPICAL - Тропическая лагуна
   ============================================ */
.fishing-scene.location-tropical .sky-layer {
    background: linear-gradient(180deg, 
        #00a8e8 0%, 
        #00d4ff 30%, 
        #40e0d0 60%, 
        #98FB98 85%,
        #FFFACD 100%);
}

.fishing-scene.location-tropical .background-layer {
    height: 30%;
    top: 22%;
    background: none;
}

.fishing-scene.location-tropical .mountains { display: none; }
.fishing-scene.location-tropical .forest { display: none; }

/* Пальмы и остров */
.fishing-scene.location-tropical .background-layer::before {
    content: '🏝️';
    position: absolute;
    bottom: -5px;
    left: 10%;
    font-size: 70px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.fishing-scene.location-tropical .background-layer::after {
    content: '🌴  🌴';
    position: absolute;
    bottom: 0;
    right: 5%;
    font-size: 45px;
    letter-spacing: 5px;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.3));
}

.fishing-scene.location-tropical .water-layer { top: 48%; }

.fishing-scene.location-tropical .water-surface {
    background: linear-gradient(180deg, 
        rgba(0, 220, 220, 0.9) 0%, 
        rgba(0, 180, 180, 0.95) 50%,
        #00a5a5 100%);
    height: 20%;
}

.fishing-scene.location-tropical .water-depth {
    top: 20%;
    background: linear-gradient(180deg, 
        #00a5a5 0%, 
        #008888 20%, 
        #006666 45%, 
        #004455 70%,
        #002233 100%);
}

/* Солнечные блики на воде */
.fishing-scene.location-tropical .water-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: 
        radial-gradient(ellipse 60px 25px at 15% 40%, rgba(255,255,255,0.7) 0%, transparent 70%),
        radial-gradient(ellipse 45px 18px at 45% 25%, rgba(255,255,255,0.5) 0%, transparent 70%),
        radial-gradient(ellipse 50px 20px at 75% 50%, rgba(255,255,255,0.6) 0%, transparent 70%),
        radial-gradient(ellipse 35px 15px at 90% 30%, rgba(255,255,255,0.4) 0%, transparent 70%);
    animation: tropicalSparkle 4s ease-in-out infinite;
}

@keyframes tropicalSparkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Летающие птицы */
.fishing-scene.location-tropical::before {
    content: '🦜';
    position: absolute;
    top: 15%;
    left: 10%;
    font-size: 20px;
    animation: birdFly 20s linear infinite;
    z-index: 6;
}

@keyframes birdFly {
    0% { left: -5%; transform: scaleX(-1); }
    49% { left: 105%; transform: scaleX(-1); }
    50% { left: 105%; transform: scaleX(1); }
    100% { left: -5%; transform: scaleX(1); }
}

/* ============================================
   ARCTIC - Арктические воды
   ============================================ */
.fishing-scene.location-arctic .sky-layer {
    background: linear-gradient(180deg, 
        #0a1628 0%, 
        #1a3050 25%, 
        #2d4a70 50%, 
        #5a8aaa 75%, 
        #a0c8e0 100%);
}

.fishing-scene.location-arctic .background-layer {
    height: 20%;
    top: 28%;
    background: none;
}

.fishing-scene.location-arctic .mountains { display: none; }
.fishing-scene.location-arctic .forest { display: none; }

/* Ледяные горы и айсберги */
.fishing-scene.location-arctic .background-layer::before {
    content: '🏔️  ❄️  🏔️';
    position: absolute;
    bottom: -5px;
    left: 10%;
    font-size: 50px;
    filter: brightness(1.3) saturate(0.3) drop-shadow(0 3px 10px rgba(0,50,100,0.3));
    letter-spacing: 15px;
}

.fishing-scene.location-arctic .background-layer::after {
    content: '🧊';
    position: absolute;
    bottom: -10px;
    right: 20%;
    font-size: 35px;
    animation: icebergFloat 15s ease-in-out infinite;
}

@keyframes icebergFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.fishing-scene.location-arctic .water-layer { top: 45%; }

.fishing-scene.location-arctic .water-surface {
    background: linear-gradient(180deg, 
        rgba(100, 150, 180, 0.95) 0%, 
        rgba(70, 120, 150, 0.95) 50%,
        #4a7a9a 100%);
    height: 18%;
}

.fishing-scene.location-arctic .water-depth {
    top: 18%;
    background: linear-gradient(180deg, 
        #4a7a9a 0%, 
        #2a5a7a 20%, 
        #1a4060 45%, 
        #0a2a45 70%,
        #051525 100%);
}

/* Льдины на воде */
.fishing-scene.location-arctic .water-surface::after {
    content: '🧊  🧊';
    position: absolute;
    top: 8px;
    right: 10%;
    font-size: 16px;
    letter-spacing: 30px;
    animation: iceFloat 8s ease-in-out infinite;
}

@keyframes iceFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

/* Падающий снег */
.fishing-scene.location-arctic::before {
    content: '❄️ ❄️ ❄️ ❄️ ❄️';
    position: absolute;
    top: -10px;
    left: 10%;
    font-size: 14px;
    letter-spacing: 40px;
    opacity: 0.7;
    animation: snowFall 8s linear infinite;
    pointer-events: none;
    z-index: 6;
}

.fishing-scene.location-arctic::after {
    content: '❄️ ❄️ ❄️ ❄️';
    position: absolute;
    top: -20px;
    left: 25%;
    font-size: 10px;
    letter-spacing: 50px;
    opacity: 0.5;
    animation: snowFall 12s linear infinite;
    animation-delay: -4s;
    pointer-events: none;
    z-index: 6;
}

@keyframes snowFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(calc(100vh)) rotate(360deg); opacity: 0; }
}

/* ============================================
   VOLCANO - Вулканическое озеро
   ============================================ */
.fishing-scene.location-volcano .sky-layer {
    background: linear-gradient(180deg, 
        #1a0505 0%, 
        #3a1010 20%, 
        #6a2020 40%, 
        #9a4030 60%, 
        #ca6040 80%,
        #ea8050 100%);
}

.fishing-scene.location-volcano .background-layer {
    height: 30%;
    top: 18%;
    background: none;
}

.fishing-scene.location-volcano .mountains { display: none; }
.fishing-scene.location-volcano .forest { display: none; }

/* Вулкан */
.fishing-scene.location-volcano .background-layer::before {
    content: '🌋';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 100px;
    filter: drop-shadow(0 0 30px rgba(255,100,0,0.5));
}

/* Огненные искры */
.fishing-scene.location-volcano .background-layer::after {
    content: '🔥 ✨ 🔥';
    position: absolute;
    top: 15px;
    left: 48%;
    transform: translateX(-50%);
    font-size: 18px;
    letter-spacing: 5px;
    animation: lavaGlow 2s ease-in-out infinite;
}

@keyframes lavaGlow {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) translateY(-8px) scale(1.1); }
}

.fishing-scene.location-volcano .water-layer { top: 48%; }

.fishing-scene.location-volcano .water-surface {
    background: linear-gradient(180deg, 
        rgba(200, 80, 30, 0.9) 0%, 
        rgba(160, 60, 20, 0.95) 50%,
        #8a3010 100%);
    height: 18%;
}

.fishing-scene.location-volcano .water-depth {
    top: 18%;
    background: linear-gradient(180deg, 
        #8a3010 0%, 
        #602008 25%, 
        #401005 50%, 
        #200803 75%,
        #100400 100%);
}

/* Пузыри от горячей воды */
.fishing-scene.location-volcano .water-surface::before {
    content: '💨 💨 💨';
    position: absolute;
    top: 0;
    left: 20%;
    font-size: 12px;
    letter-spacing: 40px;
    opacity: 0.5;
    animation: steamBubbles 3s ease-out infinite;
}

@keyframes steamBubbles {
    0% { transform: translateY(10px); opacity: 0; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-30px); opacity: 0; }
}

/* Пепел в воздухе */
.fishing-scene.location-volcano::before {
    content: '• • • • •';
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 8px;
    color: rgba(100, 80, 60, 0.6);
    letter-spacing: 30px;
    animation: ashFall 10s linear infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes ashFall {
    0% { transform: translateY(-20px) translateX(-10px); }
    100% { transform: translateY(200px) translateX(20px); }
}

/* ============================================
   ABYSS - Морская бездна
   ============================================ */
.fishing-scene.location-abyss .sky-layer {
    background: linear-gradient(180deg, 
        #000002 0%, 
        #000008 30%, 
        #000012 60%, 
        #00001a 100%);
}

.fishing-scene.location-abyss .background-layer {
    display: none;
}

.fishing-scene.location-abyss .mountains { display: none; }
.fishing-scene.location-abyss .forest { display: none; }

.fishing-scene.location-abyss .water-layer { top: 5%; }

.fishing-scene.location-abyss .water-surface {
    background: linear-gradient(180deg, 
        rgba(0, 5, 15, 0.98) 0%, 
        rgba(0, 3, 10, 0.99) 100%);
    height: 8%;
}

.fishing-scene.location-abyss .water-depth {
    top: 8%;
    background: linear-gradient(180deg, 
        #00030a 0%, 
        #000208 20%, 
        #000106 50%, 
        #000004 80%,
        #000002 100%);
}

/* Биолюминесцентные существа */
.fishing-scene.location-abyss::before {
    content: '✨';
    position: absolute;
    top: 25%;
    left: 15%;
    font-size: 10px;
    animation: biolum1 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

.fishing-scene.location-abyss::after {
    content: '✨  ✨';
    position: absolute;
    top: 45%;
    right: 20%;
    font-size: 8px;
    letter-spacing: 30px;
    animation: biolum2 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes biolum1 {
    0%, 100% { opacity: 0.2; transform: scale(0.8); filter: hue-rotate(0deg); }
    50% { opacity: 1; transform: scale(1.3); filter: hue-rotate(60deg); }
}

@keyframes biolum2 {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    33% { opacity: 0.8; transform: translateY(-8px); }
    66% { opacity: 0.5; transform: translateY(5px); }
}

/* Глубоководные тени */
.fishing-scene.location-abyss .water-depth::before {
    content: '🦑';
    position: absolute;
    bottom: 30%;
    left: 5%;
    font-size: 40px;
    opacity: 0.08;
    animation: abyssCreature 30s linear infinite;
}

.fishing-scene.location-abyss .water-depth::after {
    content: '👁️';
    position: absolute;
    top: 40%;
    right: 10%;
    font-size: 20px;
    opacity: 0;
    animation: abyssEye 8s ease-in-out infinite;
}

@keyframes abyssCreature {
    0% { transform: translateX(0) rotate(0deg); opacity: 0; }
    5% { opacity: 0.08; }
    45% { opacity: 0.12; }
    50% { transform: translateX(200px) rotate(5deg); opacity: 0; }
    100% { transform: translateX(200px); opacity: 0; }
}

@keyframes abyssEye {
    0%, 40%, 100% { opacity: 0; }
    45%, 55% { opacity: 0.3; }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Светящиеся частицы в воде */
.fishing-scene.location-abyss .water-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle 2px at 20% 30%, rgba(0, 200, 255, 0.6) 0%, transparent 100%),
        radial-gradient(circle 2px at 60% 50%, rgba(0, 255, 200, 0.5) 0%, transparent 100%),
        radial-gradient(circle 2px at 80% 20%, rgba(200, 0, 255, 0.4) 0%, transparent 100%),
        radial-gradient(circle 2px at 40% 70%, rgba(0, 200, 255, 0.5) 0%, transparent 100%);
    animation: deepGlow 5s ease-in-out infinite;
}

@keyframes deepGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Water */
.water-layer {
    position: absolute;
    top: 35%;
    left: 0;
    right: 0;
    bottom: 0;
}

.water-surface {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15%;
    background: linear-gradient(180deg, rgba(74, 144, 217, 0.8) 0%, #2e5a8a 100%);
    overflow: hidden;
}

.ripple {
    position: absolute;
    width: 100px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
}

.water-depth {
    position: absolute;
    top: 15%;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #2e5a8a 0%, #1a3d5c 30%, #0d2840 60%, #061420 100%);
    overflow: hidden;
}

.underwater-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.05) 2px, transparent 2px);
    background-size: 40px 40px, 80px 80px;
    animation: particlesFloat 20s linear infinite;
}

@keyframes particlesFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-40px); }
}

.fish-silhouette {
    position: absolute;
    width: 40px;
    height: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0;
}

/* Хвост слева - рыба плывёт вправо (нос справа) */
.fish-silhouette::after {
    content: '';
    position: absolute;
    left: -15px;
    top: 5px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 15px solid rgba(0, 0, 0, 0.2);
}

#fish-silhouette-1 {
    top: 20%;
    animation: fishSilhouetteSwim 8s ease-in-out infinite;
    animation-delay: 0s;
}

#fish-silhouette-2 {
    top: 50%;
    animation: fishSilhouetteSwim 10s ease-in-out infinite;
    animation-delay: 3s;
}

#fish-silhouette-3 {
    top: 70%;
    animation: fishSilhouetteSwim 12s ease-in-out infinite;
    animation-delay: 6s;
}

@keyframes fishSilhouetteSwim {
    0% { left: -50px; opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { left: calc(100% + 50px); opacity: 0; }
}

/* ===== УДОЧКА (SVG) ===== */
.rod-container {
    position: absolute;
    bottom: 55%;
    right: -2%;
    width: 180px;
    height: 120px;
    pointer-events: none;
    z-index: 20;
    overflow: visible;
}

.rod-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.4));
}

/* Анимация покачивания удочки при ожидании */
.rod-container.waiting .rod-svg {
    animation: rodSway 3s ease-in-out infinite;
    transform-origin: 100% 100%;
}

@keyframes rodSway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(1deg); }
}

/* Анимация заброса */
.rod-container.casting .rod-svg {
    animation: rodCast 0.6s ease-out;
    transform-origin: 100% 100%;
}

@keyframes rodCast {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(5deg); }
    75% { transform: rotate(-2deg); }
    100% { transform: rotate(0deg); }
}

/* Анимация поклёвки */
.rod-container.biting .rod-svg {
    animation: rodBite 0.3s ease-in-out infinite;
    transform-origin: 100% 100%;
}

@keyframes rodBite {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-4deg); }
}

/* Анимация вытягивания рыбы */
.rod-container.reeling .rod-svg {
    animation: rodReel 0.5s ease-in-out infinite;
    transform-origin: 100% 100%;
}

@keyframes rodReel {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* ===== СНАСТИ (леска, поплавок, крючок) ===== */
.tackle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

/* SVG леска */
.line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 18;
}

.fishing-line {
    stroke: #a0a0a0;
    stroke-width: 1.5;
    stroke-linecap: round;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}

.fishing-line.underwater {
    stroke: rgba(120, 120, 120, 0.5);
    stroke-width: 1;
}

/* ===== ПОПЛАВОК ===== */
.float {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 16;
}

.float.visible {
    opacity: 1;
}

.float.floating {
    animation: floatBob 2s ease-in-out infinite;
}

.float.bite {
    animation: floatBite 0.2s ease-in-out infinite;
}

/* Антенна - тонкая красная палочка сверху */
.float-antenna {
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, #ff2222, #dd0000);
    border-radius: 1.5px 1.5px 0 0;
}

/* Тело поплавка - красно-белое */
.float-body {
    width: 14px;
    height: 24px;
    background: linear-gradient(180deg, 
        #ee3333 0%, 
        #dd2222 40%, 
        #ffffff 40%, 
        #f5f5f5 100%);
    border-radius: 7px;
    box-shadow: 
        inset 2px 0 4px rgba(255,255,255,0.4),
        inset -2px 0 4px rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.3);
}

/* Нижний киль */
.float-bottom {
    width: 2px;
    height: 8px;
    background: linear-gradient(180deg, #666, #444);
    border-radius: 0 0 1px 1px;
}

@keyframes floatBob {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    25% { transform: translateX(-50%) translateY(-3px) rotate(2deg); }
    75% { transform: translateX(-50%) translateY(3px) rotate(-2deg); }
}

@keyframes floatBite {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(15px); }
}

/* ===== CASTING ANIMATIONS ===== */

/* Float during cast - flying through air */
.float.casting {
    transition: none;
    animation: none;
}

/* Rod swing animation */
.rod-container.casting .fishing-rod {
    animation: rodSwing 0.5s ease-out;
}

@keyframes rodSwing {
    0% { transform: translateY(-50%) rotate(-30deg); }
    30% { transform: translateY(-50%) rotate(-45deg); }
    60% { transform: translateY(-50%) rotate(-20deg); }
    100% { transform: translateY(-50%) rotate(-30deg); }
}

/* Splash effect when float lands */
.cast-splash {
    position: absolute;
    width: 60px;
    height: 30px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 17;
}

.cast-splash.active {
    opacity: 1;
    animation: splashEffect 0.8s ease-out forwards;
}

.cast-splash::before,
.cast-splash::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.6), transparent 70%);
}

.cast-splash::before {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    animation: splashRing 0.6s ease-out forwards;
}

.cast-splash::after {
    width: 40px;
    height: 20px;
    top: 5px;
    left: 10px;
    animation: splashRing 0.8s ease-out 0.1s forwards;
}

@keyframes splashEffect {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes splashRing {
    0% {
        transform: scale(0.3);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Water ripples at landing spot */
.cast-splash .ripple-1,
.cast-splash .ripple-2,
.cast-splash .ripple-3 {
    position: absolute;
    width: 20px;
    height: 10px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cast-splash.active .ripple-1 {
    animation: rippleExpand 1s ease-out forwards;
}

.cast-splash.active .ripple-2 {
    animation: rippleExpand 1s ease-out 0.2s forwards;
}

.cast-splash.active .ripple-3 {
    animation: rippleExpand 1s ease-out 0.4s forwards;
}

@keyframes rippleExpand {
    0% {
        width: 20px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 80px;
        height: 40px;
        opacity: 0;
    }
}

/* ===== КРЮЧОК ===== */
.hook-container {
    position: absolute;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    z-index: 14;
    transform: translateX(-50%);
}

.hook-container.visible {
    opacity: 1;
}

.float {
    transform: translateX(-50%);
}

/* Крючок - простой металлический */
.hook-metal {
    width: 12px;
    height: 16px;
    border: 2px solid #b8860b;
    border-top: none;
    border-radius: 0 0 6px 6px;
    position: relative;
}

.hook-metal::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: #b8860b;
}

.hook-metal::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: -3px;
    width: 6px;
    height: 6px;
    border-left: 2px solid #b8860b;
    border-bottom: 2px solid #b8860b;
    border-radius: 0 0 0 3px;
    transform: rotate(45deg);
}

/* Наживка */
.bait-icon {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    z-index: 1;
    transition: opacity 0.2s, transform 0.2s;
}

/* Рыба для анимации поклевки */
.bite-fish {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    z-index: 13;
    transform: translateX(-50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bite-fish-icon {
    font-size: 32px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transition: transform 0.2s ease;
}

/* Анимация подплывания рыбы к крючку */
.bite-fish.approaching {
    opacity: 1;
    animation: fishApproach 0.8s ease-out forwards;
}

@keyframes fishApproach {
    0% {
        transform: translateX(-50%) translateY(15%) scale(0.5) rotate(-10deg);
        opacity: 0;
    }
    30% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Анимация заглатывания наживки */
.bite-fish.swallowing {
    opacity: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%);
    animation: fishSwallow 0.4s ease-in-out;
}

@keyframes fishSwallow {
    0% {
        transform: translateX(-50%) scale(1);
    }
    30% {
        transform: translateX(-50%) scale(1.3) translateY(-5px);
    }
    60% {
        transform: translateX(-50%) scale(1.1) translateY(2px);
    }
    100% {
        transform: translateX(-50%) scale(1);
    }
}

/* Анимация уплывания рыбы */
.bite-fish.swimming-away {
    opacity: 1;
    animation: fishSwimAway 1s ease-out forwards;
}

@keyframes fishSwimAway {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
    }
    30% {
        opacity: 0.9;
        transform: translateX(-50%) translateY(-5%) scale(0.95) rotate(-10deg);
    }
    60% {
        opacity: 0.6;
        transform: translateX(30%) translateY(-10%) scale(0.8) rotate(-20deg);
    }
    100% {
        opacity: 0;
        transform: translateX(60%) translateY(-15%) scale(0.6) rotate(-35deg);
    }
}

/* Скрыть наживку когда рыба заглатывает - используем селектор через JS */
.hook-container .bait-icon.swallowed {
    opacity: 0 !important;
    transform: translateX(-50%) scale(0) !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Depth Indicator */
.depth-indicator {
    position: absolute;
    right: var(--spacing-md);
    top: 40%;
    height: 40%;
    width: 30px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s;
}

.depth-indicator.visible {
    opacity: 1;
}

.depth-scale {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
    padding-right: 10px;
}

.depth-scale::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.depth-marker {
    position: absolute;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
    transition: top 0.3s ease;
}

/* Fishing Controls */
.fishing-controls {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.equipment-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.equipment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 8px 10px;
    border-radius: 10px;
    position: relative;
    min-height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.equipment-item.clickable {
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.equipment-item.clickable:active {
    transform: scale(0.97);
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-primary);
}

.equip-change {
    font-size: 12px;
    color: var(--accent-primary);
    margin-left: auto;
    opacity: 0.7;
    flex-shrink: 0;
}

.equip-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.equip-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.equip-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.equip-stat {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Equipment Selector Modal ===== */
.equipment-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.equipment-selector-modal.active {
    display: flex;
}

.selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.selector-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    background: var(--bg-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.selector-header h3 {
    margin: 0;
    font-size: 18px;
}

.selector-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-card);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.selector-list {
    padding: var(--spacing-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-lg));
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
    min-height: 0;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.selector-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    min-height: 60px;
}

.selector-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.selector-item.selected {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.15);
}

.selector-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.selector-item-icon {
    font-size: 26px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.selector-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.selector-item-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selector-item-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selector-item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.selector-item-stat {
    font-size: 10px;
    padding: 2px 5px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

.selector-item-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 35px;
    text-align: right;
    flex-shrink: 0;
}

.cast-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.power-meter {
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    display: none;
}

.power-meter.active {
    display: block;
}

.power-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--success);
    transition: width 0.05s linear, background 0.1s;
}

.power-fill.good {
    background: var(--success);
}

.power-fill.perfect {
    background: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-primary);
}

.power-fill.weak {
    background: var(--warning);
}

.power-zones {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
}

.zone {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.zone:last-child {
    border-right: none;
}

.zone-weak {
    background: rgba(251, 191, 36, 0.2);
}

.zone-good {
    background: rgba(74, 222, 128, 0.2);
}

.zone-perfect {
    background: rgba(0, 212, 255, 0.3);
}

.cast-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-glow);
    min-height: 48px;
}

.cast-btn:active {
    transform: scale(0.98);
}

.cast-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cast-btn.waiting {
    background: var(--bg-tertiary);
    box-shadow: none;
}

.cast-btn.bite {
    background: linear-gradient(135deg, var(--warning), #f59e0b);
    animation: biteAlert 0.3s ease-in-out infinite;
}

@keyframes biteAlert {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.status-display {
    text-align: center;
    padding: 6px 0;
    margin-top: 4px;
}

.status-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.status-display.bite .status-text {
    color: var(--warning);
    font-weight: 700;
    animation: textPulse 0.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================
   Reeling Overlay - Simple & Working
   ============================================ */
.reeling-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
    padding: 16px;
    /* Предотвращаем проблемы с перерисовкой */
    transform: translateZ(0);
    will-change: auto;
    /* Гарантируем стабильность отображения */
    opacity: 1;
    visibility: visible;
    /* Предотвращаем мерцание при анимациях дочерних элементов */
    contain: layout style paint;
    isolation: isolate;
}

.reeling-overlay.active {
    display: flex !important;
    /* Гарантируем, что overlay остается видимым */
    opacity: 1 !important;
    visibility: visible !important;
    /* Предотвращаем исчезновение при анимациях */
    transform: translateZ(0) !important;
    will-change: auto;
    /* Фиксируем позицию, чтобы анимации дочерних элементов не влияли */
    position: fixed !important;
}

.reeling-panel {
    width: 100%;
    max-width: 360px;
    background: linear-gradient(145deg, #1a2a3a, #0d1520);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: panelSlideIn 0.3s ease;
    position: relative;
    overflow: visible;
    /* Гарантируем стабильность при анимациях */
    opacity: 1 !important;
    visibility: visible !important;
    /* Изолируем анимации, чтобы не влиять на родителя */
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes panelSlideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Header with fish */
.reel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.reel-fish-icon {
    font-size: 48px;
    animation: fishBounce 0.8s ease-in-out infinite;
}

@keyframes fishBounce {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.reel-fish-status {
    flex: 1;
}

.fish-behavior {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.fish-behavior.fighting {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    animation: behaviorPulse 0.4s ease-in-out infinite;
}

.fish-behavior.escaping {
    background: rgba(251, 191, 36, 0.3);
    color: #fde047;
}

.fish-behavior.tired {
    background: rgba(74, 222, 128, 0.3);
    color: #86efac;
}

@keyframes behaviorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.fish-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

/* Tension Section */
.tension-section {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 12px;
}

.tension-bar {
    position: relative;
    height: 28px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
}

.tension-zones {
    display: flex;
    width: 100%;
    height: 100%;
}

.tension-zones .zone {
    height: 100%;
}

.tension-zones .zone-low {
    width: 25%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.tension-zones .zone-good {
    width: 40%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.tension-zones .zone-danger {
    width: 35%;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.tension-indicator {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 6px;
    background: white;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,255,255,0.4);
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.1s ease;
}

.tension-indicator.good {
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34,197,94,0.8);
}

.tension-indicator.warning {
    background: #eab308;
    box-shadow: 0 0 12px rgba(234,179,8,0.8);
}

.tension-indicator.danger {
    background: #ef4444;
    box-shadow: 0 0 15px rgba(239,68,68,0.9);
    animation: dangerPulse 0.25s ease-in-out infinite;
}

@keyframes dangerPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(239,68,68,0.8); transform: translateX(-50%) scale(1); }
    50% { box-shadow: 0 0 25px rgba(239,68,68,1); transform: translateX(-50%) scale(1.2); }
}

.tension-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
}

.tension-value {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4ade80;
}

.tension-value.warning { color: #fbbf24; }
.tension-value.danger { color: #ef4444; }
.tension-value.low { color: #60a5fa; }

/* Stat bars */
.stat-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    min-width: 90px;
}

.stat-track {
    flex: 1;
    height: 10px;
    background: rgba(0,0,0,0.4);
    border-radius: 5px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.2s ease;
}

.stat-fill.fish-power {
    background: linear-gradient(90deg, #4ade80, #ef4444);
    width: 100%;
}

.stat-fill.line-health {
    background: linear-gradient(90deg, #ef4444, #4ade80);
    width: 100%;
}

/* Progress section */
.progress-section {
    background: rgba(0,100,150,0.2);
    border-radius: 10px;
    padding: 10px;
}

.progress-bar {
    position: relative;
    height: 24px;
    background: linear-gradient(90deg, #0d3d5c 0%, #1a5a8a 85%, #8b7355 100%);
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,200,255,0.3), rgba(0,200,255,0.5));
    transition: width 0.3s ease;
    width: 0%;
}

.progress-fish {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    left: 5%;
    transition: left 0.3s ease;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.progress-text span {
    font-weight: 700;
    color: #22d3ee;
}

/* Control buttons */
.reel-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Старые стили кнопок - удалены, используются новые ниже */

/* Hint */
.reel-hint {
    text-align: center;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.reel-hint.warning {
    color: #fbbf24;
    background: rgba(251,191,36,0.2);
    border: 1px solid rgba(251,191,36,0.3);
}

.reel-hint.danger {
    color: #ef4444;
    background: rgba(239,68,68,0.25);
    border: 1px solid rgba(239,68,68,0.4);
    animation: hintDanger 0.3s ease-in-out infinite;
}

.reel-hint.success {
    color: #22c55e;
    background: rgba(34,197,94,0.2);
    border: 1px solid rgba(34,197,94,0.3);
}

@keyframes hintDanger {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.01); }
}

/* Fish behavior visual classes */
.fish-behavior.fighting {
    background: rgba(239,68,68,0.3) !important;
    color: #fca5a5 !important;
    animation: behaviorFight 0.3s ease-in-out infinite;
}

.fish-behavior.escaping {
    background: rgba(251,191,36,0.3) !important;
    color: #fde047 !important;
}

.fish-behavior.tired {
    background: rgba(34,197,94,0.3) !important;
    color: #86efac !important;
}

.fish-behavior.neutral {
    background: rgba(100,116,139,0.3) !important;
    color: #cbd5e1 !important;
}

@keyframes behaviorFight {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Tension label states */
.tension-value.good { color: #22c55e; }
.tension-value.warning { color: #fbbf24; }
.tension-value.danger { color: #ef4444; animation: textPulse 0.3s infinite; }
.tension-value.low { color: #60a5fa; }

.tension-value .tension-percent {
    font-weight: 800;
    font-size: 1.1em;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Old reeling styles removed - using new .reeling-panel styles */

/* Control buttons */
.reel-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.reel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.reel-btn .btn-text {
    position: relative;
    z-index: 2;
}

/* Иконка катушки */
.reel-icon-wrapper {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.reel-icon {
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.reel-icon-reverse {
    transform: scaleX(-1);
}

/* Эффект глубины для иконки катушки */
.reel-icon-wrapper {
    position: relative;
}

.reel-icon-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.reel-btn.active .reel-icon-wrapper::after {
    opacity: 1;
    animation: reelGlow 0.6s ease-in-out infinite;
}

@keyframes reelGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
}

/* Кнопка ТЯНУТЬ */
.reel-btn-pull {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 16px rgba(16,185,129,0.4), 
                inset 0 1px 0 rgba(255,255,255,0.2),
                0 0 0 0 rgba(16,185,129,0);
}

.reel-btn-pull:active,
.reel-btn-pull.active {
    transform: scale(0.97);
    box-shadow: 0 2px 10px rgba(16,185,129,0.6), 
                inset 0 2px 4px rgba(0,0,0,0.2),
                0 0 20px rgba(16,185,129,0.5);
    background: linear-gradient(135deg, #047857, #059669);
}

/* Анимация вращения катушки при нажатии ТЯНУТЬ */
.reel-btn-pull:active .reel-icon,
.reel-btn-pull.active .reel-icon {
    animation: reelSpinForward var(--reel-speed, 0.3s) linear infinite;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.6));
}

/* Кнопка ОТПУСТИТЬ */
.reel-btn-release {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 4px 16px rgba(239,68,68,0.4), 
                inset 0 1px 0 rgba(255,255,255,0.2),
                0 0 0 0 rgba(239,68,68,0);
}

.reel-btn-release:active,
.reel-btn-release.active {
    transform: scale(0.97);
    box-shadow: 0 2px 10px rgba(239,68,68,0.6), 
                inset 0 2px 4px rgba(0,0,0,0.2),
                0 0 20px rgba(239,68,68,0.5);
    background: linear-gradient(135deg, #b91c1c, #dc2626);
}

/* Анимация вращения катушки при нажатии ОТПУСТИТЬ (обратное направление) */
.reel-btn-release:active .reel-icon,
.reel-btn-release.active .reel-icon {
    animation: reelSpinReverse 0.4s linear infinite;
}

/* Анимации вращения катушки */
@keyframes reelSpinForward {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes reelSpinReverse {
    from {
        transform: scaleX(-1) rotate(0deg);
    }
    to {
        transform: scaleX(-1) rotate(-360deg);
    }
}

/* Эффект пульсации при активном состоянии */
.reel-btn-pull.active::before,
.reel-btn-release.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    animation: reelPulse 0.6s ease-out infinite;
}

@keyframes reelPulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

/* Эффект вибрации для тактильной обратной связи - только при первом нажатии */
.reel-btn:active:not(.active) {
    animation: reelVibrate 0.1s ease;
}

@keyframes reelVibrate {
    0%, 100% { transform: translateX(0) scale(1); }
    25% { transform: translateX(-1px) scale(0.98); }
    75% { transform: translateX(1px) scale(0.98); }
}

/* Дополнительный эффект свечения при активном состоянии */
.reel-btn-pull.active {
    animation: reelGlowPull 1.5s ease-in-out infinite;
}

.reel-btn-release.active {
    animation: reelGlowRelease 1.5s ease-in-out infinite;
}

@keyframes reelGlowPull {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(16,185,129,0.6), 
                    inset 0 2px 4px rgba(0,0,0,0.2),
                    0 0 20px rgba(16,185,129,0.5);
    }
    50% {
        box-shadow: 0 2px 10px rgba(16,185,129,0.8), 
                    inset 0 2px 4px rgba(0,0,0,0.2),
                    0 0 30px rgba(16,185,129,0.7);
    }
}

@keyframes reelGlowRelease {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(239,68,68,0.6), 
                    inset 0 2px 4px rgba(0,0,0,0.2),
                    0 0 20px rgba(239,68,68,0.5);
    }
    50% {
        box-shadow: 0 2px 10px rgba(239,68,68,0.8), 
                    inset 0 2px 4px rgba(0,0,0,0.2),
                    0 0 30px rgba(239,68,68,0.7);
    }
}

/* Old reeling-game for backwards compatibility */
.reeling-game {
    width: 100%;
    max-width: 350px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fish-preview {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.mystery-fish {
    font-size: 60px;
    position: relative;
    display: inline-block;
    animation: fishStruggle 0.5s ease-in-out infinite;
}

.fish-struggle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    animation: struggleRipple 1s ease-out infinite;
}

@keyframes fishStruggle {
    0%, 100% { transform: rotate(-8deg) translateX(-4px); }
    50% { transform: rotate(8deg) translateX(4px); }
}

@keyframes fishShake {
    0% { transform: rotate(-15deg) translateX(-4px) translateY(-2px); }
    10% { transform: rotate(18deg) translateX(5px) translateY(2px); }
    20% { transform: rotate(-16deg) translateX(-5px) translateY(-1px); }
    30% { transform: rotate(17deg) translateX(4px) translateY(1px); }
    40% { transform: rotate(-14deg) translateX(-3px) translateY(-2px); }
    50% { transform: rotate(15deg) translateX(4px) translateY(2px); }
    60% { transform: rotate(-17deg) translateX(-5px) translateY(-1px); }
    70% { transform: rotate(16deg) translateX(5px) translateY(1px); }
    80% { transform: rotate(-15deg) translateX(-4px) translateY(-2px); }
    90% { transform: rotate(14deg) translateX(3px) translateY(2px); }
    100% { transform: rotate(-15deg) translateX(-4px) translateY(-2px); }
}

/* Эффект тряски для всей панели при headshake - профессиональный и заметный */
.reeling-panel.shake-effect {
    animation: panelShake 0.07s ease-in-out infinite;
    will-change: transform;
    /* Предотвращаем проблемы с перерисовкой */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    /* Гарантируем, что панель всегда видима */
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

/* Плавный переход при удалении эффекта тряски */
.reeling-panel:not(.shake-effect) {
    /* Сбрасываем transform при отсутствии эффекта */
    transform: translate3d(0, 0, 0) !important;
    /* Плавный переход для возврата к исходному состоянию */
    transition: transform 0.15s ease-out;
}

@keyframes panelShake {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    12.5% { transform: translate3d(4px, 2px, 0) rotate(0.8deg); }
    25% { transform: translate3d(-4px, -2px, 0) rotate(-0.8deg); }
    37.5% { transform: translate3d(3px, 2px, 0) rotate(0.8deg); }
    50% { transform: translate3d(-3px, -2px, 0) rotate(-0.8deg); }
    62.5% { transform: translate3d(4px, 2px, 0) rotate(0.8deg); }
    75% { transform: translate3d(-4px, -2px, 0) rotate(-0.8deg); }
    87.5% { transform: translate3d(3px, 2px, 0) rotate(0.8deg); }
}

/* Эффект тряски для индикатора натяжения - очень заметный */
.tension-indicator.headshake-active {
    animation: tensionShake 0.05s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.8));
    will-change: transform;
}

@keyframes tensionShake {
    0% { transform: translateX(-5px) translateY(-2px); }
    12.5% { transform: translateX(6px) translateY(2px); }
    25% { transform: translateX(-6px) translateY(-2px); }
    37.5% { transform: translateX(5px) translateY(2px); }
    50% { transform: translateX(-5px) translateY(-2px); }
    62.5% { transform: translateX(6px) translateY(2px); }
    75% { transform: translateX(-6px) translateY(-2px); }
    87.5% { transform: translateX(5px) translateY(2px); }
    100% { transform: translateX(-5px) translateY(-2px); }
}

/* Эффект тряски для бара натяжения */
.tension-bar.shake-effect {
    animation: barShake 0.06s ease-in-out infinite;
    will-change: transform;
}

@keyframes barShake {
    0% { transform: translateX(-2px) translateY(-1px); }
    25% { transform: translateX(3px) translateY(1px); }
    50% { transform: translateX(-3px) translateY(-1px); }
    75% { transform: translateX(2px) translateY(1px); }
    100% { transform: translateX(-2px) translateY(-1px); }
}

/* Эффект тряски для статуса рыбы */
.fish-behavior.fighting.headshake-active {
    animation: behaviorShake 0.05s ease-in-out infinite;
    background: rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

@keyframes behaviorShake {
    0%, 100% { transform: translateX(-3px) translateY(-1px) scale(1); }
    12.5% { transform: translateX(4px) translateY(1px) scale(1.03); }
    25% { transform: translateX(-4px) translateY(-1px) scale(1); }
    37.5% { transform: translateX(3px) translateY(1px) scale(1.03); }
    50% { transform: translateX(-3px) translateY(-1px) scale(1); }
    62.5% { transform: translateX(4px) translateY(1px) scale(1.03); }
    75% { transform: translateX(-4px) translateY(-1px) scale(1); }
    87.5% { transform: translateX(3px) translateY(1px) scale(1.03); }
}

/* Эффект тряски для иконки рыбы - усиленный */
.reel-fish-icon.headshake-active,
#mystery-fish.headshake-active {
    animation: fishShake 0.06s ease-in-out infinite !important;
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.8));
}

/* Эффект тряски для заголовка с рыбой */
.reel-header.headshake-active {
    animation: headerShake 0.07s ease-in-out infinite;
}

@keyframes headerShake {
    0%, 100% { transform: translateX(-2px) translateY(-1px); }
    25% { transform: translateX(3px) translateY(1px); }
    50% { transform: translateX(-3px) translateY(-1px); }
    75% { transform: translateX(2px) translateY(1px); }
}

/* Эффект тряски для стат-баров */
.stat-bar.headshake-active {
    animation: statBarShake 0.06s ease-in-out infinite;
}

.stat-bar.headshake-active .stat-track {
    animation: statTrackShake 0.05s ease-in-out infinite;
}

@keyframes statBarShake {
    0%, 100% { transform: translateX(-1px); }
    50% { transform: translateX(1px); }
}

@keyframes statTrackShake {
    0%, 100% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
}

/* Дополнительный эффект свечения при тряске */
.reeling-panel.shake-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 22px;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: shakeGlow 0.07s ease-in-out infinite;
    z-index: -1;
}

@keyframes shakeGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.02); }
}

/* Эффект тряски для кнопок управления при headshake */
.reel-controls.shake-effect .reel-btn {
    animation: buttonShake 0.06s ease-in-out infinite;
}

@keyframes buttonShake {
    0%, 100% { transform: translateX(-1px) translateY(-1px); }
    50% { transform: translateX(1px) translateY(1px); }
}

@keyframes fishDive {
    0%, 100% { transform: rotate(15deg) translateY(0); }
    50% { transform: rotate(25deg) translateY(3px); }
}

@keyframes fishTired {
    0%, 100% { transform: rotate(5deg); opacity: 0.8; }
    50% { transform: rotate(15deg); opacity: 1; }
}

@keyframes fishIdle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes fishSwim {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(3px); }
}

@keyframes struggleRipple {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.tension-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
}

.tension-meter {
    margin-bottom: var(--spacing-lg);
}

.tension-bar {
    height: 30px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.tension-danger-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20%;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.5), transparent);
}

.tension-danger-zone.left {
    left: 0;
}

.tension-danger-zone.right {
    right: 0;
    background: linear-gradient(-90deg, rgba(239, 68, 68, 0.5), transparent);
}

.tension-safe-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30%;
    right: 30%;
    background: rgba(74, 222, 128, 0.3);
}

.tension-needle {
    position: absolute;
    top: 2px;
    bottom: 2px;
    width: 6px;
    background: var(--text-primary);
    border-radius: 3px;
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.05s linear;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.tension-target {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    left: 30%;
    border: 2px dashed var(--success);
    border-radius: var(--radius-sm);
    pointer-events: none;
}

.tension-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.line-integrity {
    margin-bottom: var(--spacing-md);
}

.integrity-label, .progress-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.integrity-bar, .progress-bar {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.integrity-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
    transition: width 0.1s;
}

.reel-progress {
    margin-bottom: var(--spacing-lg);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    transition: width 0.1s;
    border-radius: var(--radius-full);
}

.fish-icon-progress {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    font-size: 16px;
    transition: left 0.1s;
}

.reel-controls {
    margin-bottom: var(--spacing-md);
}

.reel-btn {
    width: 100%;
    padding: var(--spacing-lg);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.reel-btn:active {
    transform: scale(0.98);
    background: var(--accent-secondary);
}

.reel-icon {
    width: 30px;
    height: 30px;
}

.reel-icon svg {
    width: 100%;
    height: 100%;
}

.reel-btn:active .reel-icon svg {
    animation: reelSpin 0.2s linear infinite;
}

@keyframes reelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.reel-hints {
    text-align: center;
}

.reel-hints p {
    font-size: 12px;
    color: var(--text-secondary);
}

.hint-warning {
    color: var(--warning) !important;
    font-weight: 600;
    min-height: 18px;
}

/* ============================================
   Catch Overlay
   ============================================ */
.catch-overlay, .fail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 300;
    padding: var(--spacing-md);
}

.catch-overlay.active, .fail-overlay.active {
    display: flex;
}

.catch-result, .fail-result {
    width: 100%;
    max-width: 350px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    animation: catchReveal 0.5s ease;
}

@keyframes catchReveal {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.catch-animation {
    position: relative;
    height: 120px;
    margin-bottom: var(--spacing-lg);
}

.water-splash {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: splashExpand 1s ease-out;
}

@keyframes splashExpand {
    0% { width: 20px; height: 20px; opacity: 1; }
    100% { width: 150px; height: 150px; opacity: 0; }
}

.caught-fish {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fish-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.5;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

.fish-emoji {
    font-size: 70px;
    position: relative;
    z-index: 1;
    animation: fishBounce 0.5s ease infinite;
}

@keyframes fishBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.catch-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--success);
    color: white;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.catch-info .fish-name {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
}

.fish-rarity {
    display: inline-block;
    padding: 2px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.fish-rarity.common { background: var(--rarity-common); color: white; }
.fish-rarity.uncommon { background: var(--rarity-uncommon); color: white; }
.fish-rarity.rare { background: var(--rarity-rare); color: white; }
.fish-rarity.epic { background: var(--rarity-epic); color: white; }
.fish-rarity.legendary { background: var(--rarity-legendary); color: white; }

.fish-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.fish-stat {
    text-align: center;
}

.fish-stat .stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.fish-stat .stat-value {
    font-size: 18px;
    font-weight: 700;
}

.fish-stat .stat-value.gold {
    color: var(--gold);
}

.new-record, .new-species {
    display: none;
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--gold);
    border-radius: var(--radius-md);
    color: var(--gold);
    font-weight: 600;
    animation: recordPulse 1s ease-in-out infinite;
}

.new-record.show, .new-species.show {
    display: block;
}

@keyframes recordPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.catch-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.action-btn {
    flex: 1;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn.sell {
    background: var(--gold-gradient);
    color: #333;
}

.action-btn.keep {
    background: var(--accent-gradient);
    color: white;
}

.action-btn .btn-icon {
    font-size: 24px;
    width: auto;
    height: auto;
    background: none;
}

.action-btn .btn-label {
    font-size: 12px;
}

.action-btn .btn-value {
    font-weight: 800;
}

/* Fail Result */
.fail-result {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #1a1a2e 100%);
}

.fail-icon {
    font-size: 80px;
    margin-bottom: var(--spacing-md);
}

.fail-title {
    font-size: 24px;
    margin-bottom: var(--spacing-sm);
}

.fail-reason {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.retry-btn {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

/* ============================================
   Shop Screen
   ============================================ */
#shop-screen {
    background: var(--bg-primary);
}

.shop-tabs {
    display: flex;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.shop-tabs::-webkit-scrollbar {
    display: none;
}

.shop-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.shop-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.shop-content {
    flex: 1;
    min-height: 0;
    padding: var(--spacing-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-md));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.shop-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.shop-item.owned {
    border-color: var(--success);
    background: rgba(74, 222, 128, 0.05);
}

.shop-item.equipped {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.05);
}

.item-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.item-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.item-stats {
    display: flex;
    gap: var(--spacing-sm);
}

.item-stat {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.item-stat.power {
    color: var(--accent-primary);
}

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.item-price {
    font-weight: 700;
    color: var(--gold);
}

.buy-btn, .equip-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.buy-btn {
    background: var(--gold-gradient);
    color: #333;
}

.buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.equip-btn {
    background: var(--accent-gradient);
    color: white;
}

.equipped-label {
    font-size: 11px;
    color: var(--accent-primary);
    font-weight: 600;
}

/* ============================================
   Inventory Screen
   ============================================ */
#inventory-screen {
    background: var(--bg-primary);
}

.inventory-tabs {
    display: flex;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
}

.inv-tab {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.inv-tab.active {
    background: var(--accent-gradient);
    color: white;
}

.inventory-content {
    flex: 1;
    min-height: 0;
    padding: var(--spacing-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-md));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.inventory-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

.inventory-empty .empty-icon {
    font-size: 60px;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.inv-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--spacing-sm) 0;
    margin-bottom: var(--spacing-xs);
}

.inv-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.inv-item.active-item {
    background: rgba(var(--primary-rgb), 0.15);
    border: 1px solid var(--primary);
}

.inv-item:hover {
    background: var(--bg-card-hover, rgba(255,255,255,0.08));
}

.inv-item .item-icon {
    width: 45px;
    height: 45px;
    font-size: 24px;
}

.inv-item .item-details {
    flex: 1;
}

.inv-item .item-name {
    font-size: 13px;
}

.inv-item .item-meta {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 11px;
    color: var(--text-muted);
}

.inv-item .sell-btn {
    padding: 6px 12px;
    background: var(--gold-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #333;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.inventory-footer {
    padding: var(--spacing-md);
    padding-bottom: calc(var(--safe-bottom) + var(--spacing-md));
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.inventory-summary {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.sell-all-btn {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--gold-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #333;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.sell-all-btn:disabled {
    opacity: 0.5;
}

/* ============================================
   Collection Screen
   ============================================ */
#collection-screen {
    background: var(--bg-primary);
}

.collection-header {
    padding: var(--spacing-md);
}

.collection-progress {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.collection-progress .progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.collection-progress .progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
}

.collection-filters {
    display: flex;
    padding: 0 var(--spacing-md) var(--spacing-md);
    gap: var(--spacing-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.collection-filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.filter-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

.collection-grid {
    flex: 1;
    padding: 0 var(--spacing-md) var(--spacing-md);
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    align-content: start;
}

.collection-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.collection-card:active {
    transform: scale(0.98);
}

.collection-card.discovered {
    border-color: rgba(255, 255, 255, 0.1);
}

.collection-card.undiscovered {
    opacity: 0.5;
}

.collection-card .card-icon {
    font-size: 36px;
    margin-bottom: var(--spacing-xs);
}

.collection-card.undiscovered .card-icon {
    filter: grayscale(1) brightness(0.5);
}

.collection-card .card-name {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-card.undiscovered .card-name {
    color: var(--text-muted);
}

.collection-card .card-rarity {
    font-size: 9px;
    margin-top: 2px;
}

/* Fish Details Modal */
.fish-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 500;
}

.fish-details-modal.active {
    display: flex;
}

.fish-details-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.fish-details-modal .modal-content {
    position: relative;
    width: 90%;
    max-width: 350px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.fish-detail-content {
    padding: var(--spacing-xl);
    text-align: center;
}

.fish-detail-content .detail-icon {
    font-size: 80px;
    margin-bottom: var(--spacing-md);
}

/* ============================================
   Daily Reward Modal
   ============================================ */
.daily-reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 600;
    padding: var(--spacing-md);
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
}

.daily-reward-modal.active {
    display: flex;
}

.daily-reward-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.daily-reward-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    background: linear-gradient(145deg, #1a2a3a, #0d1520);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalSlideUp 0.4s ease;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.daily-reward-modal.bonus-day .daily-reward-content {
    border: 2px solid var(--gold);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
}

.daily-reward-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-icon-large {
    font-size: 64px;
    margin-bottom: var(--spacing-sm);
    animation: rewardPulse 2s ease-in-out infinite;
}

@keyframes rewardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.reward-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reward-day {
    font-size: 18px;
    color: var(--accent-primary);
    font-weight: 600;
}

.daily-reward-main {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
}

.reward-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
}

.reward-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.reward-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.reward-details {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.reward-icon-small {
    font-size: 24px;
}

.reward-coins,
.reward-exp {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
}

.reward-label {
    font-size: 12px;
    color: var(--text-muted);
}

.reward-extras {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reward-extra {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    font-size: 14px;
}

.reward-streak {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(0, 212, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.reward-streak-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: var(--spacing-xs);
}

.reward-streak-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
}

.daily-reward-calendar {
    margin-bottom: var(--spacing-lg);
}

.calendar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-xs);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.calendar-day {
    position: relative;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs);
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.calendar-day.today {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.calendar-day.claimed {
    background: rgba(74, 222, 128, 0.15);
    border-color: var(--success);
    opacity: 0.7;
}

.calendar-day.missed {
    opacity: 0.3;
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day.bonus {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
}

.calendar-day-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.calendar-day-icon {
    font-size: 16px;
    margin: 2px 0;
}

.calendar-day-reward {
    font-size: 9px;
    color: var(--text-muted);
}

.calendar-day .checkmark {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    color: var(--success);
    font-weight: 700;
}

.claim-reward-btn {
    width: 100%;
    padding: var(--spacing-lg);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.claim-reward-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.claim-reward-btn:active {
    transform: translateY(0);
}

.claim-reward-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fish-detail-content .detail-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
}

.fish-detail-content .detail-rarity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.fish-detail-content .detail-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.fish-detail-content .detail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.fish-detail-content .detail-stat {
    background: var(--bg-card);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.fish-detail-content .detail-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.fish-detail-content .detail-stat-value {
    font-size: 16px;
    font-weight: 700;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: calc(var(--safe-top) + var(--spacing-md));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-lg);
    animation: toastSlide 0.3s ease;
    pointer-events: auto;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

.toast.warning {
    border-color: var(--warning);
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

@keyframes toastSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast.hiding {
    animation: toastHide 0.3s ease forwards;
}

@keyframes toastHide {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-20px); opacity: 0; }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

/* ============================================
   Achievements Screen
   ============================================ */
#achievements-screen {
    background: var(--bg-primary);
}

.achievements-header {
    padding: var(--spacing-md);
}

.achievements-summary {
    display: flex;
    justify-content: space-around;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.summary-stat {
    text-align: center;
}

.summary-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-primary);
}

.summary-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.achievements-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.ach-progress-fill {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.achievements-list {
    flex: 1;
    min-height: 0;
    padding: 0 var(--spacing-md) var(--spacing-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-md));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.achievement-card.completed {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.05);
}

.achievement-card.locked {
    opacity: 0.6;
}

.achievement-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.achievement-card.completed .achievement-icon {
    background: var(--gold-gradient);
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.achievement-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.achievement-reward {
    font-size: 11px;
    color: var(--gold);
    font-weight: 600;
}

.achievement-status {
    text-align: center;
}

.achievement-check {
    font-size: 24px;
    color: var(--gold);
}

.achievement-progress {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   Crafting Screen
   ============================================ */
#crafting-screen {
    background: var(--bg-primary);
}

.crafting-resources {
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-md);
    background: var(--bg-card);
    margin: var(--spacing-md);
    border-radius: var(--radius-lg);
}

.resource-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.resource-icon {
    font-size: 20px;
}

.resource-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.fish-storage-info {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    margin: 0 var(--spacing-md);
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
}

.crafting-tabs {
    display: flex;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
}

.craft-tab {
    flex: 1;
    padding: var(--spacing-sm);
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.craft-tab.active {
    background: var(--accent-gradient);
    color: white;
}

.recipes-list {
    flex: 1;
    min-height: 0;
    padding: 0 var(--spacing-md) var(--spacing-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-md));
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.recipe-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.recipe-card.locked {
    opacity: 0.5;
}

.recipe-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.recipe-icon {
    font-size: 28px;
    min-width: 44px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.recipe-info {
    flex: 1;
    min-width: 0;
}

.recipe-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.3;
}

.recipe-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 2px;
}

.recipe-level {
    font-size: 10px;
    color: var(--accent-primary);
    padding: 2px 6px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.recipe-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.ingredient {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    padding: 3px 6px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.ingredient.has {
    color: var(--success);
}

.ingredient.missing {
    color: var(--error);
}

.recipe-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.result-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.result-preview .result-icon {
    font-size: 18px;
}

.result-preview .result-quantity {
    font-weight: 600;
    color: var(--accent-primary);
}

.craft-btn {
    padding: 8px 16px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 700;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.craft-btn:disabled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.craft-btn:not(:disabled):active {
    transform: scale(0.95);
}

/* ============================================
   Leaderboard Screen
   ============================================ */
#leaderboard-screen {
    background: var(--bg-primary);
}

.leaderboard-tabs {
    display: flex;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
}

.lb-tab {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lb-tab.active {
    background: var(--accent-gradient);
    color: white;
}

.player-rank-card {
    margin: 0 var(--spacing-md) var(--spacing-md);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.rank-position {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-number {
    font-size: 18px;
    font-weight: 800;
}

.rank-info {
    flex: 1;
}

.rank-name {
    display: block;
    font-weight: 700;
    font-size: 16px;
}

.rank-stats {
    font-size: 12px;
    opacity: 0.8;
}

.rank-score {
    font-size: 20px;
    font-weight: 800;
}

.leaderboard-list {
    flex: 1;
    min-height: 0;
    padding: 0 var(--spacing-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-md));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.lb-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.lb-item.top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 179, 71, 0.1));
    border: 1px solid var(--gold);
}

.lb-item.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(169, 169, 169, 0.1));
    border: 1px solid #c0c0c0;
}

.lb-item.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(184, 115, 51, 0.1));
    border: 1px solid #cd7f32;
}

.lb-rank {
    width: 30px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
}

.lb-item.top-1 .lb-rank { color: var(--gold); }
.lb-item.top-2 .lb-rank { color: #c0c0c0; }
.lb-item.top-3 .lb-rank { color: #cd7f32; }

.lb-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.lb-info {
    flex: 1;
}

.lb-name {
    font-weight: 600;
    font-size: 14px;
}

.lb-stats {
    font-size: 11px;
    color: var(--text-muted);
}

.lb-score {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-primary);
}

.leaderboard-footer {
    padding: var(--spacing-md);
    text-align: center;
}

.lb-info {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   Quest Screen
   ============================================ */
#quests-screen {
    background: var(--bg-primary);
}

/* Стили для quests-screen header */
#quests-screen .screen-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

/* Скрываем кнопку "Назад" в quests-screen */
#quests-screen .back-btn {
    display: none !important;
}

.quest-tabs {
    display: flex;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.quest-tab {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quest-tab.active {
    background: var(--accent-gradient);
    color: white;
}

.quests-content {
    flex: 1;
    min-height: 0;
    padding: var(--spacing-md);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--spacing-lg));
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.quest-timer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-muted);
}

.quest-completed-count {
    color: var(--accent-primary);
    font-weight: 600;
}

.quest-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

.quest-chain-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quest-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.quest-card.completed {
    border-color: var(--success);
    background: rgba(74, 222, 128, 0.05);
}

.quest-card.claimed {
    opacity: 0.6;
    border-color: transparent;
}

.quest-card.story {
    border-left: 3px solid var(--accent-primary);
}

.quest-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.quest-icon {
    font-size: 28px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.quest-info {
    flex: 1;
    min-width: 0;
}

.quest-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.quest-description {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.quest-difficulty {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.quest-progress-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quest-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.quest-progress-fill.story {
    background: linear-gradient(90deg, #a855f7, #ec4899);
}

.quest-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: right;
}

.quest-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quest-rewards {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.quest-reward-label {
    color: var(--text-muted);
}

.quest-claim-btn {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: not-allowed;
    transition: all var(--transition-fast);
}

.quest-claim-btn.ready {
    background: var(--success);
    color: white;
    cursor: pointer;
    animation: pulse 1.5s infinite;
}

.quest-claim-btn.ready:active {
    transform: scale(0.95);
}

.quest-claim-btn.claimed {
    background: transparent;
    color: var(--success);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

/* ============================================
   Energy System
   ============================================ */
.header-right-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.energy-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.energy-display:hover {
    background: var(--bg-card-hover, rgba(255,255,255,0.1));
}

.energy-icon {
    font-size: 14px;
}

.energy-bar-mini {
    width: 40px;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.energy-fill-mini {
    height: 100%;
    width: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease, background 0.3s ease;
}

.energy-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
    flex-shrink: 0;
}

/* Energy Modal */
.energy-modal-overlay {
    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: 2000;
    animation: fadeIn 0.3s ease;
}

.energy-modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    max-width: 340px;
    width: 90%;
    animation: scaleIn 0.3s ease;
}

.energy-modal-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
}

.energy-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.energy-modal-current {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.energy-bar-modal {
    width: 120px;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.energy-fill-modal {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.energy-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.energy-modal-bolts {
    font-size: 16px;
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(251, 191, 36, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.energy-modal-bolts strong {
    color: #fbbf24;
}

.energy-modal-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.energy-modal-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.energy-modal-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.energy-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.energy-btn-small {
    padding: var(--spacing-md);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.energy-btn-small:active {
    transform: scale(0.98);
}

.energy-btn-small.disabled,
.energy-btn-refill.disabled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.energy-btn-refill {
    padding: var(--spacing-md);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.energy-btn-refill:active {
    transform: scale(0.98);
}

.energy-btn-close {
    padding: var(--spacing-md);
    background: transparent;
    border: 1px solid var(--text-muted);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

/* Lightning bolts display */
.bolts-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    color: #fbbf24;
    margin-left: auto;
}

/* Mini bolts display (in header) */
.bolts-mini {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    color: #fbbf24;
    /* Правильная мягкая тень вместо полоски */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Boss System
   ============================================ */
.boss-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.boss-warning-overlay.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.boss-warning-content {
    text-align: center;
    animation: bossAppear 0.5s ease;
}

@keyframes bossAppear {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.boss-warning-icon {
    font-size: 80px;
    animation: bossPulse 1s infinite;
}

@keyframes bossPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.boss-warning-title {
    font-size: 36px;
    font-weight: 900;
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    margin: var(--spacing-md) 0;
    animation: shake 0.5s ease infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.boss-warning-name {
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: var(--spacing-sm);
}

.boss-warning-desc {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 300px;
    margin: 0 auto var(--spacing-md);
}

.boss-warning-requirements {
    font-size: 12px;
    color: var(--warning);
}

/* Boss Ability Notification */
.boss-ability-notification {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 68, 68, 0.9);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    z-index: 2500;
    animation: abilitySlide 0.3s ease;
}

.boss-ability-notification.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes abilitySlide {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.ability-icon {
    font-size: 24px;
}

.ability-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

/* Boss Victory Screen */
.boss-victory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.5s ease;
}

.boss-victory-content {
    text-align: center;
    animation: victoryAppear 0.6s ease;
}

@keyframes victoryAppear {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.boss-victory-icon {
    font-size: 100px;
    animation: victoryBounce 1s ease infinite;
}

@keyframes victoryBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.boss-victory-title {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: var(--spacing-md) 0;
}

.boss-victory-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.boss-victory-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.boss-victory-rewards-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.boss-rewards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.reward-item {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.reward-item.special {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.boss-victory-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--gold-gradient);
    border: none;
    border-radius: var(--radius-lg);
    color: #333;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.boss-victory-btn:active {
    transform: scale(0.95);
}

/* Boss phase indicator */
.boss-phase-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 68, 68, 0.9);
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 700;
    color: white;
}

/* ============================================
   Junk Overlay
   ============================================ */
.junk-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.junk-content {
    text-align: center;
    padding: var(--spacing-xl);
    animation: junkAppear 0.4s ease;
}

@keyframes junkAppear {
    0% { transform: translateY(30px) rotate(-10deg); opacity: 0; }
    50% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0); opacity: 1; }
}

.junk-icon {
    font-size: 80px;
    margin-bottom: var(--spacing-md);
    filter: grayscale(0.5) brightness(0.8);
}

.junk-title {
    font-size: 28px;
    font-weight: 900;
    color: #888;
    margin-bottom: var(--spacing-xs);
}

.junk-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.junk-weight {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.junk-description {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 280px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.4;
    font-style: italic;
}

.junk-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--bg-card);
    border: 2px solid #666;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.junk-btn:hover {
    background: var(--bg-secondary);
    border-color: #888;
}

.junk-btn:active {
    transform: scale(0.95);
}

/* Junk rarity style */
.fish-rarity.junk {
    background: rgba(128, 128, 128, 0.2);
    color: #888;
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.text-gold {
    color: var(--gold);
}

.text-accent {
    color: var(--accent-primary);
}

/* ============================================
   Trainer Screen
   ============================================ */
#trainer-screen {
    background: linear-gradient(180deg, #1a4a6e 0%, #0d2840 50%, #0a1628 100%);
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#trainer-screen .screen-header {
    background: linear-gradient(180deg, rgba(26, 74, 110, 0.95) 0%, rgba(13, 40, 64, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding-top: calc(var(--safe-top) + var(--spacing-sm));
    padding-right: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Скрываем кнопку "Назад" в trainer-screen, используем нативную */
#trainer-screen .back-btn {
    display: none !important;
}

#trainer-screen .back-btn {
    width: auto;
    min-width: 80px;
    height: 40px;
    padding: 0 var(--spacing-md);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#trainer-screen .back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

#trainer-screen .back-btn:active {
    transform: translateY(0) scale(0.98);
    background: rgba(255, 255, 255, 0.2);
}

#trainer-screen .screen-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-left: var(--spacing-md);
}

.trainer-content {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
}

.trainer-selection {
    text-align: center;
}

.trainer-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
}

.difficulty-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.difficulty-card {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
}

.difficulty-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.2);
}

.difficulty-card.selected {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.difficulty-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
}

.difficulty-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.difficulty-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.difficulty-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    font-size: 12px;
    color: var(--text-muted);
}

.trainer-game {
    margin-top: var(--spacing-xl);
}

.trainer-info-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trainer-tips {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.tip-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.trainer-stats {
    display: flex;
    justify-content: space-around;
    gap: var(--spacing-md);
}

.trainer-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
}

.trainer-controls {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.trainer-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.trainer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.4);
}

.trainer-btn:active {
    transform: translateY(0);
}

.trainer-btn.secondary {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    box-shadow: none;
}

.trainer-btn.secondary:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

/* Подсказки во время вываживания */
.trainer-hint-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    z-index: 1000;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    animation: hintPulse 0.3s ease;
}

@keyframes hintPulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.trainer-hint-content {
    text-align: center;
}

.trainer-hint-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
}

.trainer-hint-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-sm);
}

.trainer-hint-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.trainer-hint-close {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
