/* ═══════════════════════════════════════════════════════════════
   MCHUG.com — Minecraft-themed CSS
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap');

:root {
    --mc-dark: #1a1a2e;
    --mc-darker: #0f0f1a;
    --mc-panel: #2a2a3e;
    --mc-panel-light: #353550;
    --mc-border: #4a4a6a;
    --mc-border-light: #5a5a7a;
    --mc-green: #55ff55;
    --mc-green-dark: #00aa00;
    --mc-gold: #ffaa00;
    --mc-gold-dark: #cc8800;
    --mc-red: #ff5555;
    --mc-aqua: #55ffff;
    --mc-purple: #aa00aa;
    --mc-light-purple: #ff55ff;
    --mc-text: #e0e0e0;
    --mc-text-muted: #8888aa;
    --mc-slot-bg: #8b8b8b;
    --mc-slot-border-dark: #373737;
    --mc-slot-border-light: #c6c6c6;
    --mc-inventory-bg: #c6c6c6;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Silkscreen', monospace;
    color: var(--mc-text);
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    image-rendering: pixelated;
}

/* ─── Backgrounds ──────────────────────────────────────────── */

.mc-bg {
    background-color: var(--mc-darker);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(85, 255, 85, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255, 170, 0, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
}

.mc-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.005) 2px,
            rgba(255, 255, 255, 0.005) 4px
        );
    pointer-events: none;
    z-index: 0;
}

.mc-bg > * {
    position: relative;
    z-index: 1;
}

.mc-bg-admin {
    background-color: var(--mc-darker);
}

/* ─── Navigation / Hotbar ──────────────────────────────────── */

.mc-hotbar {
    background: linear-gradient(180deg, var(--mc-panel) 0%, var(--mc-dark) 100%);
    border-bottom: 3px solid var(--mc-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mc-logo {
    text-decoration: none;
    color: var(--mc-text);
}

.mc-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--mc-green) 0%, var(--mc-green-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--mc-darker);
    border: 2px solid var(--mc-green);
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.3),
        inset -2px -2px 0 rgba(0, 0, 0, 0.3),
        0 0 15px rgba(85, 255, 85, 0.3);
}

.mc-nav-link {
    color: var(--mc-text-muted);
    text-decoration: none;
    padding: 6px 12px;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.mc-nav-link:hover {
    color: var(--mc-green);
    border-color: var(--mc-border);
    background: rgba(85, 255, 85, 0.05);
}

/* ─── Titles & Text ────────────────────────────────────────── */

.mc-title {
    font-family: 'Silkscreen', monospace;
    font-weight: 700;
    color: var(--mc-text);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.mc-text {
    color: var(--mc-text);
}

.mc-text-muted {
    color: var(--mc-text-muted);
}

.text-mc-green { color: var(--mc-green); }
.text-mc-gold { color: var(--mc-gold); }
.text-mc-aqua { color: var(--mc-aqua); }

/* ─── Panels ───────────────────────────────────────────────── */

.mc-panel {
    background: var(--mc-panel);
    border: 3px solid var(--mc-border);
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ─── Server Cards ─────────────────────────────────────────── */

.mc-card {
    display: block;
    text-decoration: none;
    transition: all 0.25s;
}

.mc-card-inner {
    background: var(--mc-panel);
    border: 3px solid var(--mc-border);
    overflow: hidden;
    transition: all 0.25s;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

.mc-card:hover .mc-card-inner {
    border-color: var(--mc-green);
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2),
        0 8px 32px rgba(85, 255, 85, 0.15),
        0 0 0 1px var(--mc-green);
    transform: translateY(-4px);
}

.mc-card-image {
    border-bottom: 3px solid var(--mc-border);
    overflow: hidden;
}

.mc-card-placeholder {
    background: linear-gradient(135deg, var(--mc-dark) 0%, var(--mc-panel) 100%);
}

.mc-card-footer {
    padding: 12px 20px;
    border-top: 2px solid var(--mc-border);
    background: rgba(0, 0, 0, 0.15);
}

/* ─── Item Slots (Inventory-style) ─────────────────────────── */

.mc-item-slot {
    transition: all 0.25s;
}

.mc-item-inner {
    background: var(--mc-panel);
    border: 3px solid var(--mc-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.25s;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2);
    position: relative;
}

.mc-item-slot:hover .mc-item-inner {
    border-color: var(--mc-gold);
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 170, 0, 0.15);
}

/* Enchantment shimmer on hover */
.mc-item-inner::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(170, 0, 170, 0.08) 45%,
        rgba(255, 85, 255, 0.12) 50%,
        rgba(170, 0, 170, 0.08) 55%,
        transparent 70%
    );
    transition: all 0.6s ease;
    pointer-events: none;
    opacity: 0;
}

.mc-item-slot:hover .mc-item-inner::after {
    opacity: 1;
    animation: enchant-shimmer 2s linear infinite;
}

@keyframes enchant-shimmer {
    0% { transform: translate(-20%, -20%) rotate(0deg); }
    100% { transform: translate(20%, 20%) rotate(0deg); }
}

.mc-item-image {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid var(--mc-border);
    padding: 10px;
}

.mc-item-image img {
    max-height: 60px;
    max-width: 60px;
    object-fit: contain;
    image-rendering: pixelated;
}

.mc-item-placeholder {
    font-size: 2rem;
}

.mc-item-info {
    padding: 12px;
    flex: 1;
}

.mc-item-name {
    font-family: 'Silkscreen', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--mc-text);
    margin-bottom: 4px;
}

.mc-item-desc {
    color: var(--mc-text-muted);
    font-size: 0.7rem;
    line-height: 1.4;
}

.mc-item-footer {
    padding: 10px 12px;
    border-top: 2px solid var(--mc-border);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mc-price {
    font-family: 'Silkscreen', monospace;
    font-weight: 700;
    color: var(--mc-gold);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* ─── Buttons ──────────────────────────────────────────────── */

.mc-btn {
    display: inline-block;
    padding: 10px 24px;
    font-family: 'Silkscreen', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--mc-darker);
    background: linear-gradient(180deg, var(--mc-green) 0%, var(--mc-green-dark) 100%);
    border: 3px solid var(--mc-green);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.3),
        inset -2px -2px 0 rgba(0, 0, 0, 0.3),
        0 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    top: 0;
}

.mc-btn:hover {
    filter: brightness(1.15);
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.4),
        inset -2px -2px 0 rgba(0, 0, 0, 0.3),
        0 6px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(85, 255, 85, 0.3);
    top: -2px;
}

.mc-btn:active {
    box-shadow:
        inset -2px -2px 0 rgba(255, 255, 255, 0.3),
        inset 2px 2px 0 rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(0, 0, 0, 0.3);
    top: 2px;
}

.mc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.mc-btn-sm {
    display: inline-block;
    padding: 5px 12px;
    font-family: 'Silkscreen', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--mc-text);
    background: var(--mc-panel-light);
    border: 2px solid var(--mc-border);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.1),
        inset -1px -1px 0 rgba(0, 0, 0, 0.2);
}

.mc-btn-sm:hover {
    border-color: var(--mc-green);
    color: var(--mc-green);
}

.mc-btn-buy {
    display: inline-block;
    padding: 5px 14px;
    font-family: 'Silkscreen', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--mc-darker);
    background: linear-gradient(180deg, var(--mc-gold) 0%, var(--mc-gold-dark) 100%);
    border: 2px solid var(--mc-gold);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.3);
}

.mc-btn-buy:hover {
    filter: brightness(1.2);
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        inset -1px -1px 0 rgba(0, 0, 0, 0.3),
        0 0 12px rgba(255, 170, 0, 0.4);
}

.mc-btn-danger {
    background: linear-gradient(180deg, #ff5555 0%, #aa0000 100%);
    border-color: var(--mc-red);
    color: white;
}

.mc-btn-danger:hover {
    border-color: #ff8888;
    color: white;
    filter: brightness(1.2);
}

/* ─── Inputs ───────────────────────────────────────────────── */

.mc-input {
    background: var(--mc-dark);
    border: 3px solid var(--mc-border);
    color: var(--mc-text);
    padding: 10px 14px;
    font-family: 'Silkscreen', monospace;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
    box-shadow:
        inset 2px 2px 0 rgba(0, 0, 0, 0.3),
        inset -2px -2px 0 rgba(255, 255, 255, 0.05);
}

.mc-input:focus {
    border-color: var(--mc-green);
    box-shadow:
        inset 2px 2px 0 rgba(0, 0, 0, 0.3),
        inset -2px -2px 0 rgba(255, 255, 255, 0.05),
        0 0 15px rgba(85, 255, 85, 0.15);
}

.mc-input::placeholder {
    color: var(--mc-text-muted);
    opacity: 0.6;
}

.mc-label {
    display: block;
    color: var(--mc-text-muted);
    font-size: 0.75rem;
    margin-bottom: 6px;
    font-family: 'Silkscreen', monospace;
}

select.mc-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888aa' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ─── Checkout Payment Options ─────────────────────────────── */

.mc-payment-option {
    background: var(--mc-dark);
    border: 3px solid var(--mc-border);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.03),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2);
}

.mc-payment-option:hover {
    border-color: var(--mc-border-light);
    background: var(--mc-panel);
}

.mc-payment-selected {
    border-color: var(--mc-green) !important;
    background: rgba(85, 255, 85, 0.05) !important;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.03),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2),
        0 0 20px rgba(85, 255, 85, 0.1);
}

.mc-payment-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.mc-sms-code, .mc-sms-number {
    background: var(--mc-dark);
    border: 3px solid var(--mc-border);
    padding: 12px 20px;
    text-align: center;
    margin-top: 8px;
    box-shadow:
        inset 2px 2px 0 rgba(0, 0, 0, 0.3),
        inset -2px -2px 0 rgba(255, 255, 255, 0.05);
}

.mc-slot-border {
    border: 3px solid var(--mc-border);
    background: var(--mc-dark);
    box-shadow:
        inset 2px 2px 0 rgba(0, 0, 0, 0.3),
        inset -2px -2px 0 rgba(255, 255, 255, 0.05);
}

.mc-highlight-box {
    background: var(--mc-dark);
    border: 3px solid var(--mc-border);
    padding: 16px;
    display: inline-block;
    margin-top: 8px;
}

/* ─── Status page spinner ──────────────────────────────────── */

.mc-spin {
    display: inline-block;
    animation: mc-pulse 1.5s ease-in-out infinite;
}

@keyframes mc-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* ─── Error Box ────────────────────────────────────────────── */

.mc-error-box {
    background: rgba(255, 85, 85, 0.1);
    border: 2px solid var(--mc-red);
    color: var(--mc-red);
    padding: 10px 16px;
    font-size: 0.85rem;
}

/* ─── Footer ───────────────────────────────────────────────── */

.mc-footer {
    border-top: 3px solid var(--mc-border);
    background: var(--mc-panel);
}

/* ─── Admin Navigation ─────────────────────────────────────── */

.mc-admin-nav {
    background: linear-gradient(180deg, #2a2040 0%, #1a1a2e 100%);
    border-bottom: 3px solid var(--mc-border);
}

.mc-admin-link {
    color: var(--mc-text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 4px 10px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.mc-admin-link:hover {
    color: var(--mc-gold);
    border-color: var(--mc-border);
}

/* ─── Admin Cards ──────────────────────────────────────────── */

.mc-stat-card {
    background: var(--mc-panel);
    border: 3px solid var(--mc-border);
    padding: 20px;
    text-align: center;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2);
}

.mc-stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.mc-stat-value {
    font-family: 'Silkscreen', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--mc-gold);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.mc-stat-label {
    font-size: 0.75rem;
    color: var(--mc-text-muted);
    margin-top: 4px;
}

.mc-admin-card {
    display: block;
    background: var(--mc-panel);
    border: 3px solid var(--mc-border);
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2);
}

.mc-admin-card:hover {
    border-color: var(--mc-gold);
    transform: translateY(-2px);
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(255, 170, 0, 0.1);
}

/* ─── Tables ───────────────────────────────────────────────── */

.mc-table-wrap {
    overflow-x: auto;
}

.mc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.mc-table th {
    background: var(--mc-panel);
    color: var(--mc-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 3px solid var(--mc-border);
}

.mc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--mc-border);
    vertical-align: middle;
}

.mc-table tbody tr {
    background: var(--mc-dark);
    transition: background 0.15s;
}

.mc-table tbody tr:hover {
    background: var(--mc-panel);
}

/* ─── Badges ───────────────────────────────────────────────── */

.mc-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: 'Silkscreen', monospace;
    border: 2px solid;
    text-transform: uppercase;
}

.mc-badge-green {
    color: var(--mc-green);
    border-color: var(--mc-green);
    background: rgba(85, 255, 85, 0.1);
}

.mc-badge-yellow {
    color: var(--mc-gold);
    border-color: var(--mc-gold);
    background: rgba(255, 170, 0, 0.1);
}

.mc-badge-blue {
    color: var(--mc-aqua);
    border-color: var(--mc-aqua);
    background: rgba(85, 255, 255, 0.1);
}

.mc-badge-red {
    color: var(--mc-red);
    border-color: var(--mc-red);
    background: rgba(255, 85, 85, 0.1);
}

/* ─── Modals ───────────────────────────────────────────────── */

.mc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.mc-modal-content {
    background: var(--mc-panel);
    border: 3px solid var(--mc-border);
    padding: 24px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.05),
        inset -2px -2px 0 rgba(0, 0, 0, 0.2),
        0 16px 64px rgba(0, 0, 0, 0.5);
}

/* ─── Scrollbar ────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--mc-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--mc-border);
    border: 2px solid var(--mc-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mc-border-light);
}

/* ─── Utility ──────────────────────────────────────────────── */

.hidden {
    display: none !important;
}

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
    .mc-title {
        font-size: 1.2rem;
    }

    .mc-hotbar .text-xl {
        font-size: 1rem;
    }

    .mc-item-image {
        height: 60px;
    }

    .mc-modal-content {
        padding: 16px;
    }
}
