/* VIP Items page */

.vip-main {
    padding: 40px 20px 60px;
}

.vip-back {
    display: inline-block;
    margin-bottom: 25px;
    color: #bb88ff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.vip-back:hover {
    color: #d4b3ff;
}

.vip-panel {
    background: linear-gradient(135deg, rgba(30, 18, 38, 0.85) 0%, rgba(15, 15, 30, 0.85) 100%);
    border: 2px solid rgba(187, 136, 255, 0.25);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.vip-panel h2 {
    color: #bb88ff;
    font-size: 1.8rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.vip-help {
    color: #b0a8c0;
    margin-bottom: 20px;
}

.vip-cmd {
    background: rgba(187, 136, 255, 0.15);
    border: 1px solid rgba(187, 136, 255, 0.4);
    border-radius: 6px;
    padding: 2px 8px;
    color: #d4b3ff;
    font-weight: 700;
}

/* Code entry */
.vip-code-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.vip-code-input {
    flex: 0 0 160px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 12px;
    padding: 12px 10px;
    background: rgba(10, 10, 20, 0.8);
    border: 2px solid rgba(187, 136, 255, 0.4);
    border-radius: 12px;
    color: #fff;
}

.vip-code-input:focus {
    outline: none;
    border-color: #bb88ff;
    box-shadow: 0 0 20px rgba(187, 136, 255, 0.4);
}

.vip-btn {
    background: linear-gradient(135deg, #bb88ff 0%, #8a4fd8 100%);
    color: #fff;
    border: 2px solid #bb88ff;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
}

.vip-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #c99dff 0%, #bb88ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(187, 136, 255, 0.5);
}

.vip-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vip-message {
    margin-top: 16px;
    font-weight: 600;
    min-height: 1.2em;
}

.vip-message.error {
    color: #ff6b6b;
}

.vip-message.success {
    color: #00ff88;
}

/* Player bar */
.vip-player-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.vip-player-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.vip-tier-badge {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 5px 14px;
    border-radius: 20px;
    border: 2px solid #bb88ff;
    color: #bb88ff;
    background: rgba(187, 136, 255, 0.12);
}

/* Item grid — 5 wide */
.vip-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.vip-item {
    --splash: rgba(187, 136, 255, 0.45);
    position: relative;
    background:
        radial-gradient(ellipse 72% 58% at 50% 44%, var(--splash), transparent 72%),
        rgba(10, 10, 20, 0.78);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

/* Armor: each set on its own row */
.vip-armor-set {
    margin-bottom: 20px;
}

.vip-armor-set-label {
    font-weight: 700;
    color: #bb88ff;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(187, 136, 255, 0.2);
}

/* Houses — one big picture per row */
.vip-house-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.vip-house-card {
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(10, 10, 20, 0.8);
    transition: all 0.2s ease;
}

.vip-house-card img {
    display: block;
    width: 100%;
    height: auto;
}

.vip-house-card .vip-house-name {
    padding: 14px 20px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #d0c8e0;
}

.vip-house-card:hover {
    border-color: #bb88ff;
    box-shadow: 0 8px 34px rgba(187, 136, 255, 0.4);
}

.vip-house-card.selected {
    border-color: #00ff88;
    box-shadow: 0 0 28px rgba(0, 255, 136, 0.45);
}

.vip-house-card.selected .vip-house-name {
    color: #00ff88;
}

/* Repeatable (dye) quantity badge */
.vip-qty-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: #00ff88;
    color: #0a0a14;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 2px 9px;
    border-radius: 11px;
    cursor: pointer;
}

.vip-qty-badge:empty {
    display: none;
}

/* Repeatable (dye) remove button */
.vip-qty-minus {
    position: absolute;
    top: 6px;
    left: 8px;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #ff5555;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.vip-qty-minus:hover {
    background: #ff7777;
}

/* Color picker section */
.vip-color-picker {
    padding: 4px 0;
}

.vip-color-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.vip-color-swatch {
    width: 70px;
    height: 56px;
    padding: 0;
    border: 2px solid rgba(187, 136, 255, 0.4);
    border-radius: 12px;
    background: rgba(10, 10, 20, 0.8);
    cursor: pointer;
}

.vip-color-hex {
    width: 150px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 10px;
    background: rgba(10, 10, 20, 0.8);
    border: 2px solid rgba(187, 136, 255, 0.4);
    border-radius: 12px;
    color: #fff;
}

.vip-color-hex:focus,
.vip-color-swatch:focus {
    outline: none;
    border-color: #bb88ff;
    box-shadow: 0 0 16px rgba(187, 136, 255, 0.4);
}

.vip-color-preview {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Colored splash behind each icon, cycling like the in-game grid */
.vip-grid .vip-item:nth-child(7n + 1) { --splash: rgba(187, 136, 255, 0.45); }
.vip-grid .vip-item:nth-child(7n + 2) { --splash: rgba(95, 230, 130, 0.40); }
.vip-grid .vip-item:nth-child(7n + 3) { --splash: rgba(255, 158, 46, 0.42); }
.vip-grid .vip-item:nth-child(7n + 4) { --splash: rgba(255, 220, 70, 0.38); }
.vip-grid .vip-item:nth-child(7n + 5) { --splash: rgba(255, 92, 196, 0.40); }
.vip-grid .vip-item:nth-child(7n + 6) { --splash: rgba(86, 206, 255, 0.40); }
.vip-grid .vip-item:nth-child(7n)     { --splash: rgba(255, 96, 96, 0.38); }

.vip-item img {
    width: 100%;
    max-width: 90px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin-bottom: 8px;
}

/* Dye-style option: base image used as a mask, filled with the hex color */
.vip-dye-swatch {
    display: block;
    width: 90px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0 auto 8px;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.vip-item-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #d0c8e0;
}

.vip-item:hover:not(.locked) {
    border-color: #bb88ff;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(187, 136, 255, 0.35);
}

.vip-item.selected {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.vip-item.selected .vip-item-label {
    color: #00ff88;
}

.vip-item.locked {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.7);
}

.vip-item-tier {
    display: block;
    margin-top: 6px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a7fa0;
}

/* Claim bar */
.vip-claim-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.vip-selection-count {
    font-weight: 700;
    color: #b0a8c0;
}

/* Item sections */
.vip-section {
    margin-bottom: 35px;
}

.vip-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(187, 136, 255, 0.25);
}

.vip-section-head h3 {
    color: #bb88ff;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.vip-section-count {
    font-weight: 700;
    color: #b0a8c0;
}

.vip-section-count.full {
    color: #00ff88;
}

.vip-credit {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 4px;
}

.vip-credit a {
    color: #bb88ff;
}

@media (max-width: 700px) {
    .vip-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .vip-panel {
        padding: 22px;
    }
}
