
/* ========================================
   MAP BAN SYSTEM STYLES
   ======================================== */

/* Setup Phase */
.mapban-setup {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.mapban-setup h2 {
    font-size: 2.5rem;
    color: var(--accent-red);
    margin-bottom: 2rem;
}

.setup-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
}

.setup-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.ban-type-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ban-type-btn {
    background: rgba(0,0,0,0.3);
    border: 2px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
}

.ban-type-btn:hover {
    border-color: var(--accent-red);
    color: var(--text-primary);
}

.ban-type-btn.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

/* Best Of Selection */
.bestof-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.bestof-btn {
    background: rgba(0,0,0,0.3);
    border: 2px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 1.25rem 1.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.bestof-btn:hover {
    border-color: var(--accent-red);
    color: var(--text-primary);
    transform: translateY(-3px);
}

.bestof-btn.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

.bestof-label {
    font-size: 1.5rem;
    font-weight: 900;
}

.bestof-desc {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 400;
}

.custom-maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.custom-map-checkbox {
    background: rgba(0,0,0,0.3);
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.custom-map-checkbox:hover {
    border-color: var(--accent-red);
}

.custom-map-checkbox.selected {
    background: rgba(255, 70, 85, 0.2);
    border-color: var(--accent-red);
}

.custom-map-checkbox input {
    margin-right: 0.5rem;
}

.team-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.team-inputs input {
    flex: 1;
    max-width: 300px;
    padding: 1rem;
    font-size: 1.25rem;
    text-align: center;
}

.vs-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-red);
}

.large-btn {
    padding: 1rem 3rem;
    font-size: 1.25rem;
    margin-top: 2rem;
}

/* Coin Toss Phase */
.mapban-cointoss {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.mapban-cointoss h2 {
    font-size: 2.5rem;
    color: var(--accent-red);
    margin-bottom: 2rem;
}

.cointoss-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 3rem;
    border: 1px solid var(--glass-border);
}

.coin {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.coin.flipping {
    animation: coinFlip 1s ease-in-out;
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(1800deg); }
}

.coin-side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    backface-visibility: hidden;
}

.coin-side.heads {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.coin-side.tails {
    background: linear-gradient(135deg, #C0C0C0, #808080);
    color: #000;
    transform: rotateY(180deg);
}

.cointoss-choice, .cointoss-heads-tails, .cointoss-result {
    margin-top: 2rem;
}

.cointoss-choice p, .cointoss-heads-tails p, .cointoss-result p {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.team-btn, .choice-btn {
    background: var(--bg-primary);
    border: 2px solid var(--accent-red);
    color: var(--text-primary);
    padding: 1rem 2rem;
    margin: 0 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
}

.team-btn:hover, .choice-btn:hover {
    background: var(--accent-red);
    transform: scale(1.05);
}

/* Ban/Pick Phase */
.mapban-phase {
    padding: 2rem;
}

.mapban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-red);
}

.mapban-header h2 {
    font-size: 2rem;
    color: var(--accent-red);
}

.turn-indicator {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.turn-indicator span {
    color: var(--accent-red);
}

.mapban-maps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Fixed 5 columns for uniform layout */
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* For smaller screens, adjust to 4 columns */
@media (max-width: 1400px) {
    .mapban-maps-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* For tablets, adjust to 3 columns */
@media (max-width: 1024px) {
    .mapban-maps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* For mobile, adjust to 2 columns */
@media (max-width: 640px) {
    .mapban-maps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.mapban-card {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    aspect-ratio: 16 / 11; /* Fixed aspect ratio for uniform cards */
    display: flex;
    flex-direction: column;
}

.mapban-card:hover:not(.banned):not(.picked) {
    transform: translateY(-5px);
    border-color: var(--accent-red);
    box-shadow: 0 10px 20px rgba(255, 70, 85, 0.3);
}

.mapban-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s;
}

.mapban-card.banned img {
    filter: grayscale(100%) brightness(0.4);
}

.mapban-card.picked img {
    filter: brightness(1.2);
}

.mapban-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s;
}

.mapban-card.banned .mapban-card-overlay,
.mapban-card.picked .mapban-card-overlay {
    opacity: 1;
}

.ban-x {
    font-size: 6rem;
    color: #ff0000;
    font-weight: 900;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.pick-check {
    font-size: 5rem;
    color: #00ff00;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mapban-card.picked {
    border-color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.mapban-card.banned {
    border-color: #ff0000;
}

.mapban-card-name {
    padding: 0.75rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.9) 100%);
    position: absolute;
    bottom: 0;
    width: 100%;
}

.mapban-card.picked .mapban-card-name {
    background: linear-gradient(180deg, rgba(0,255,0,0.2) 0%, rgba(0,100,0,0.9) 100%);
}

.side-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
}

.side-badge.attack {
    color: #ff6b6b;
    border: 2px solid #ff6b6b;
}

.side-badge.defense {
    color: #4ecdc4;
    border: 2px solid #4ecdc4;
}

/* Ban Summary */
.ban-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.team-summary {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.team-summary h4 {
    font-size: 1.5rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
    text-align: center;
}

.bans-list, .picks-list {
    margin-top: 1rem;
}

.bans-list::before {
    content: '🚫 Bans:';
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ff4444;
}

.picks-list::before {
    content: '✅ Picks:';
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #44ff44;
}

.summary-item {
    padding: 0.5rem;
    margin: 0.25rem 0;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

/* Side Selection Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 16px;
    border: 2px solid var(--accent-red);
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.side-buttons {
    display: flex;
    gap: 2rem;
}

.side-btn {
    flex: 1;
    padding: 2rem;
    font-size: 1.5rem;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
}

.attack-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    color: white;
}

.attack-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 68, 68, 0.5);
}

.defense-btn {
    background: linear-gradient(135deg, #4ecdc4, #2a9d8f);
    color: white;
}

.defense-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.5);
}
