/* Color Palette: #101820 (Dark), #A2D8E2 (Light Blue) */
.wfl-pitch-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #fff;
}

.wfl-pitch-container.dark-mode {
    background-color: #101820;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.wfl-pitch-header {
    text-align: center;
    margin-bottom: 24px;
}

.wfl-logo {
    max-height: 60px;
    margin-bottom: 15px;
    display: inline-block;
}

.wfl-pitch-header h2 {
    color: #A2D8E2;
    margin: 0;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(162, 216, 226, 0.4);
}

/* Glassmorphism Pitch */
.wfl-pitch {
    position: relative;
    background: linear-gradient(180deg, #1c4a2a 0%, #112d19 100%);
    border-radius: 12px;
    overflow: hidden;
    padding: 25px 0;
    margin-bottom: 25px;
    border: 1px solid rgba(162, 216, 226, 0.2);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.6);
}

/* Pitch grass pattern */
.wfl-pitch::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 25px, rgba(255,255,255,0.04) 25px, rgba(255,255,255,0.04) 50px);
    pointer-events: none;
    z-index: 1;
}

.wfl-formation {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-height: 420px;
    justify-content: space-around;
}

.wfl-pitch-row {
    display: flex;
    justify-content: center;
    gap: 18px;
}

/* Player Slots */
.wfl-player-slot {
    width: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.wfl-player-slot:hover {
    transform: translateY(-5px) scale(1.05);
}

.wfl-player-slot.selected {
    filter: drop-shadow(0 0 12px #A2D8E2);
}

.wfl-player-shirt {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px 5px 15px 15px;
    margin-bottom: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.wfl-player-slot.gk-slot .wfl-player-shirt {
    background: rgba(220, 200, 50, 0.2);
    border-color: rgba(255, 255, 100, 0.5);
}

.wfl-player-info {
    background: rgba(16, 24, 32, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(162, 216, 226, 0.3);
    border-radius: 6px;
    padding: 4px 6px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.wfl-player-name {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wfl-player-price {
    display: block;
    font-size: 10px;
    color: #A2D8E2;
    margin-top: 2px;
}

/* Bench container */
.wfl-bench-container {
    background: rgba(25, 36, 48, 0.7);
    border: 1px solid rgba(162, 216, 226, 0.15);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 25px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.wfl-bench-container h3 {
    margin: 0 0 18px 0;
    color: #A2D8E2;
    text-align: center;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wfl-bench {
    display: flex;
    justify-content: center;
    gap: 22px;
}

.wfl-bench .wfl-player-slot {
    position: relative;
}

.wfl-bench-priority {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #A2D8E2;
    color: #101820;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 3px 6px rgba(0,0,0,0.6);
    z-index: 10;
}

/* Actions */
.wfl-actions {
    text-align: center;
}

.wfl-save-btn {
    background: linear-gradient(135deg, #A2D8E2 0%, #7ab3be 100%);
    color: #101820;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(162, 216, 226, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wfl-save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(162, 216, 226, 0.6);
}

.wfl-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#wfl-save-message {
    margin-top: 18px;
    font-size: 15px;
    font-weight: 600;
}

.wfl-msg-error { color: #ff6b6b; }
.wfl-msg-success { color: #51cf66; }

/* Mobile responsiveness */
@media (max-width: 480px) {
    .wfl-player-slot { width: 58px; }
    .wfl-player-shirt { width: 38px; height: 38px; }
    .wfl-player-info { padding: 3px 4px; }
    .wfl-player-name { font-size: 10px; }
    .wfl-bench-priority { width: 18px; height: 18px; font-size: 10px; top: -8px; right: -8px; }
    .wfl-pitch-row { gap: 10px; }
}

/* Transfer Market */
.wfl-transfers-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: inherit;
    color: #fff;
    background-color: #101820;
    border-radius: 12px;
    padding: 24px;
}

.wfl-transfers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(162,216,226,0.2);
    padding-bottom: 10px;
}

.wfl-budget {
    font-size: 18px;
    font-weight: bold;
    color: #A2D8E2;
}

.wfl-transfers-grid {
    display: flex;
    gap: 20px;
}

.wfl-squad-panel, .wfl-market-panel {
    flex: 1;
    background: rgba(25, 36, 48, 0.7);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(162,216,226,0.1);
}

.wfl-squad-rules {
    font-size: 12px;
    color: #A2D8E2;
    margin-top: -10px;
    margin-bottom: 15px;
}

.wfl-market-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.wfl-market-filters .wfl-select, .wfl-market-filters .wfl-input {
    padding: 8px;
    background: #101820;
    border: 1px solid rgba(162,216,226,0.3);
    color: #fff;
    border-radius: 4px;
}

.wfl-market-table-wrap {
    max-height: 400px;
    overflow-y: auto;
}

.wfl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wfl-table th {
    background: #101820;
    color: #A2D8E2;
    padding: 10px;
    text-align: left;
    position: sticky;
    top: 0;
}

.wfl-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.wfl-btn-buy, .wfl-btn-sell {
    background: #A2D8E2;
    color: #101820;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.wfl-btn-sell {
    background: #ff6b6b;
    color: #fff;
}

/* Leaderboard */
.wfl-leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #101820;
    color: #fff;
    padding: 24px;
    border-radius: 12px;
}

.wfl-lb-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.wfl-lb-tabs .wfl-btn {
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 6px;
    transition: 0.3s;
}

.wfl-lb-tabs .wfl-btn.active, .wfl-lb-tabs .wfl-btn:hover {
    background: #A2D8E2;
    color: #101820;
}

@media (max-width: 768px) {
    .wfl-transfers-grid {
        flex-direction: column;
    }
}

/* Unified App Navigation */
.wfl-app-container {
    position: relative;
    min-height: 100vh;
}

.wfl-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(16, 24, 32, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(162, 216, 226, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.wfl-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-decoration: none;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.wfl-nav-item:hover, .wfl-nav-item.active {
    opacity: 1;
    color: #A2D8E2;
}

.wfl-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.wfl-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
