
/* 
   FOKUS PRO // VS ARENA STYLE v2.0
   Theme: "Molten Core" (Orange/Red/Black)
*/

:root {
    --vs-primary: #f97316; /* Orange */
    --vs-primary-bright: #fbbf24;
    --vs-danger: #ef4444;
    --vs-bg-card: #0f0505;
    --vs-bg-surface: #1a0b0b;
    --vs-glass: rgba(249, 115, 22, 0.05);
    --vs-border: rgba(249, 115, 22, 0.3);
}

/* --- TAB HEADER --- */
.vs-dashboard-header {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.15) 0%, transparent 100%);
    padding: 20px; border-radius: 12px; border-left: 6px solid var(--vs-primary);
    color: white; font-weight: 900; letter-spacing: 2px; font-size: 1.2rem;
    margin-bottom: 25px; display: flex; align-items: center; gap: 15px;
    box-shadow: 0 10px 30px -10px rgba(249, 115, 22, 0.2);
    text-shadow: 0 0 10px var(--vs-primary);
}
.vs-dashboard-header i { color: var(--vs-primary); font-size: 1.5rem; }

/* --- SECTIONS --- */
.vs-section-divider {
    font-size: 0.8rem; font-weight: 800; color: #666; letter-spacing: 2px;
    padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
}
.vs-section-empty {
    text-align: center; color: #444; font-size: 0.9rem; padding: 20px;
}

/* --- LIST CONTAINER (FIX FOR CLIPPING) --- */
.vs-list-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    /* Ensure no fixed height clips the content */
    height: auto;
    overflow: visible;
    padding-bottom: 100px; /* Space for Nav Dock */
}

/* --- BATTLE CARD DESIGN (Replaces old list items) --- */
.vs-battle-card {
    background: var(--vs-bg-card);
    border: 1px solid var(--vs-border);
    border-radius: 16px;
    /* Removed margin-bottom here as gap is handled by container */
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.2s, border-color 0.2s;
    display: flex; flex-direction: column;
    flex-shrink: 0; /* Prevent shrinking in flex containers */
}
.vs-battle-card:hover {
    transform: translateY(-5px);
    border-color: var(--vs-primary);
    box-shadow: 0 15px 40px rgba(249, 115, 22, 0.15);
}

/* Status Header */
.vs-card-status-bar {
    padding: 12px 15px;
    font-size: 0.75rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.05);
}
.st-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

/* Status Colors */
.vs-status-pending .st-dot { background: #9ca3af; box-shadow: 0 0 5px #9ca3af; }
.vs-status-pending .vs-card-status-bar { color: #9ca3af; }

.vs-status-active { border-color: var(--vs-primary); }
.vs-status-active .st-dot { background: var(--vs-primary); box-shadow: 0 0 8px var(--vs-primary); animation: pulse-orange 1.5s infinite; }
.vs-status-active .vs-card-status-bar { background: rgba(249, 115, 22, 0.1); color: var(--vs-primary); }

.vs-status-completed .st-dot { background: #10b981; }
.vs-status-completed .vs-card-status-bar { color: #10b981; }

.vs-status-declined .st-dot { background: #ef4444; }
.vs-status-declined .vs-card-status-bar { color: #ef4444; }

.vs-status-cancelled .st-dot { background: #713f12; }
.vs-status-cancelled .vs-card-status-bar { color: #888; }

/* Avatar Split View */
.vs-split-view {
    display: flex; justify-content: space-between; align-items: center;
    padding: 25px 20px 15px 20px;
    position: relative;
}
.vs-player { display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2; width: 90px; }
.vs-player img {
    width: 64px; height: 64px; border-radius: 14px; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1); background: #000;
}
.vs-player-name { font-size: 0.8rem; font-weight: 700; color: #ccc; text-align: center; line-height: 1.2; }
.vs-player.is-me img { border-color: var(--vs-primary); box-shadow: 0 0 15px rgba(249, 115, 22, 0.2); }

.vs-divider {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    font-family: var(--font-tech); font-weight: 900; font-style: italic; font-size: 1.8rem;
    color: rgba(255,255,255,0.1); z-index: 1;
}
.vs-divider i { color: var(--vs-primary); font-size: 1.5rem; filter: drop-shadow(0 0 10px var(--vs-primary)); }

/* Info Section */
.vs-info-block { text-align: center; padding: 10px 0 25px 0; }
.vs-ex-name { font-size: 1.1rem; font-weight: 700; color: white; margin-bottom: 8px; }
.vs-pot-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(249, 115, 22, 0.1); border: 1px solid rgba(249, 115, 22, 0.3);
    padding: 8px 16px; border-radius: 20px;
    font-family: var(--font-tech); font-size: 0.9rem; font-weight: 700; color: var(--vs-primary-bright);
}

/* RESULTS GRID IN CARD (NEW) */
.vs-results-overview {
    padding: 10px 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.vs-res-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vs-res-label {
    font-size: 0.7rem; color: #888; width: 60px; text-align: right; margin-right: 10px;
}
.vs-mini-grid {
    display: flex; gap: 2px; flex: 1;
}
.vs-mini-cell {
    flex: 1; height: 24px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-tech); font-size: 0.65rem; color: #aaa;
}
.vs-res-avg {
    width: 50px; text-align: right;
    font-family: var(--font-tech); font-weight: 800; color: white; font-size: 0.9rem;
}

/* Action Area */
.vs-card-actions {
    padding: 15px; background: rgba(0,0,0,0.4);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; gap: 10px;
}

/* Big Buttons */
.vs-btn-block {
    flex: 1; border: none; padding: 16px; border-radius: 8px;
    font-weight: 800; font-size: 0.9rem; cursor: pointer;
    text-transform: uppercase; letter-spacing: 1px;
    transition: 0.2s; display: flex; justify-content: center; align-items: center; gap: 8px;
}

.btn-vs-primary {
    background: var(--vs-primary); color: #000;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
}
.btn-vs-primary:hover {
    background: #fff; box-shadow: 0 0 30px var(--vs-primary); transform: translateY(-2px);
}

.btn-vs-ghost {
    background: rgba(255,255,255,0.05); color: #9ca3af; border: 1px solid rgba(255,255,255,0.1);
}
.btn-vs-ghost:hover { background: rgba(255,255,255,0.1); color: white; border-color: white; }

.btn-vs-danger {
    background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-vs-danger:hover { background: #ef4444; color: white; }


/* --- CREATOR MODAL REWORK --- */
.vs-create-window { 
    background: #050202; 
    border: 1px solid var(--vs-primary); 
    box-shadow: 0 0 60px rgba(249, 115, 22, 0.15);
    padding: 20px;
    /* Use dvh for dynamic viewport height on mobile */
    max-height: 85dvh;
    display: flex; flex-direction: column;
}

.vs-create-steps {
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column;
}

.vs-step { flex: 1; display: flex; flex-direction: column; }

/* Step Headers */
.vs-step-head {
    font-size: 1.1rem; color: white; font-weight: 800; text-align: center;
    padding-bottom: 20px; margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.vs-step-head span { color: var(--vs-primary); }

/* Inventory Grid (Exercise Selection) */
.vs-inventory-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px; padding-bottom: 20px;
}
.vs-inv-item {
    background: #150a0a; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; overflow: hidden; cursor: pointer;
    transition: 0.2s; position: relative;
    display: flex; flex-direction: column;
}
.vs-inv-item:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.4); }
.vs-inv-item.selected {
    border-color: var(--vs-primary);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}
.vs-inv-item.selected::after {
    content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; top: 5px; right: 5px;
    background: var(--vs-primary); color: black;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 0.7rem;
}

.vs-inv-img { height: 90px; background-size: cover; background-position: center; opacity: 0.8; }
.vs-inv-item.selected .vs-inv-img { opacity: 1; }
.vs-inv-title {
    padding: 10px; font-size: 0.75rem; font-weight: 700; color: #ccc;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-align: center;
}
.vs-inv-item.selected .vs-inv-title { color: var(--vs-primary); }

/* Config Section Styles */
.vs-config-wrapper {
    flex: 1;
}

.vs-config-box {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 20px; margin-bottom: 20px;
}
.vs-config-label {
    display: block; font-size: 0.7rem; color: #888; font-weight: 700; 
    letter-spacing: 1px; margin-bottom: 15px; text-transform: uppercase;
}

/* Big Toggle Switch */
.vs-currency-switch {
    display: flex; background: black; border-radius: 8px; padding: 4px;
    border: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px;
}
.vs-curr-opt {
    flex: 1; padding: 12px; border: none; background: transparent;
    color: #666; font-weight: 800; font-size: 0.9rem; cursor: pointer;
    border-radius: 6px; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.vs-curr-opt.active {
    background: rgba(255,255,255,0.1); color: white;
}
.vs-curr-opt.active[data-type="koins"] { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.vs-curr-opt.active[data-type="xp"] { color: #60a5fa; background: rgba(96, 165, 250, 0.1); }

/* Slider Styling */
.vs-slider-container { margin: 20px 0; padding: 0 10px; }
.vs-big-slider {
    width: 100%; -webkit-appearance: none; background: transparent; cursor: pointer;
}
.vs-big-slider::-webkit-slider-runnable-track {
    width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px;
}
.vs-big-slider::-webkit-slider-thumb {
    -webkit-appearance: none; height: 28px; width: 28px; border-radius: 50%;
    background: var(--vs-primary); border: 4px solid #000;
    margin-top: -10px; box-shadow: 0 0 15px var(--vs-primary);
    transition: transform 0.1s;
}
.vs-big-slider:active::-webkit-slider-thumb { transform: scale(1.2); }

.vs-wager-display {
    text-align: center; font-family: var(--font-tech); font-size: 2.5rem; 
    font-weight: 800; color: white; margin-top: 10px;
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

/* Balance Footer */
.vs-bal-footer {
    display: flex; justify-content: space-between; 
    font-size: 0.75rem; color: #666; font-family: var(--font-tech);
    border-top: 1px solid rgba(255,255,255,0.05); padding-top: 15px;
}

/* --- ACTIONS FOOTER (IMPROVED RESPONSIVE) --- */
.vs-actions {
    margin-top: auto; /* Push to bottom */
    padding-top: 20px;
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.vs-actions button {
    flex: 1;
    min-height: 50px; /* Use min-height instead of fixed height */
    height: auto;
    border-radius: 12px;
    font-size: 0.8rem; /* Smaller font default */
    padding: 10px;
    line-height: 1.2;
    word-break: break-word; /* Wrap text */
}

/* OVERRIDE FOR SEND BUTTON */
#btn-vs-send {
    background: var(--vs-primary);
    color: #000;
    border: none;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
    font-weight: 900;
    letter-spacing: 1px;
}
#btn-vs-send:hover {
    background: #fff;
    box-shadow: 0 0 40px var(--vs-primary);
    transform: translateY(-2px);
}

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

/* --- MOBILE OPTIMIZATIONS --- */
@media (max-width: 600px) {
    .vs-create-window {
        padding: 10px;
        width: 100%;
        border-radius: 16px 16px 0 0;
    }
    
    .vs-split-view {
        padding: 15px 10px;
    }
    
    .vs-player {
        width: 70px;
    }
    .vs-player img {
        width: 50px; height: 50px;
    }
    
    .vs-inventory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vs-wager-display {
        font-size: 2rem;
    }
    
    .vs-actions {
        padding-bottom: 20px; /* Bottom padding for mobile safespace */
    }

    /* SPECIFIC FIX FOR SEND BUTTON FONT */
    #btn-vs-send {
        font-size: 0.8rem !important; /* Force smaller font on mobile */
        min-height: 60px; /* Ensure tall enough */
    }
}
