@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --primary: #d4af37;
    --accent: #9d4edd;
    --accent-light: #c77dff;
    --bg: #1a0033;
    --bg-light: #2d1b4e;
    --text: #f0e6ff;
    --text-secondary: #c8b6ff;
    --lime: #a6ff00;
    --lime-dark: #7ec300;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', monospace;
    background: #202124;
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.modal-body {
    font-size: 12px;
}

.btn-close {
    filter: var(--bs-btn-close-white-filter);
}

/* ============ Grid ============ */
#pixelGrid {
    width: 1000px;
    height: 1000px;
    margin: 0 auto;
    outline: 2px solid var(--primary);
    position: relative;
    background-color: #0d0015;
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(212, 175, 55, 0.05) 25%, rgba(212, 175, 55, 0.05) 26%, transparent 27%, transparent 74%, rgba(212, 175, 55, 0.05) 75%, rgba(212, 175, 55, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(212, 175, 55, 0.05) 25%, rgba(212, 175, 55, 0.05) 26%, transparent 27%, transparent 74%, rgba(212, 175, 55, 0.05) 75%, rgba(212, 175, 55, 0.05) 76%, transparent 77%, transparent);
    background-size: 20px 20px;
}

/* ============ Navigation ============ */
nav {
    background-color: #202124;
    border-bottom: 3px solid var(--primary);
    padding: 20px 0;
}

#logo {
    max-width: 1200px;
    height: auto;
    margin-top: 20px;
}

.mrg-set {
    margin: 0;
    margin-top: -20px;
}

.navbar-text {
    font-size: 11px;
    color: var(--lime);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(166, 255, 0, 0.4);
}

#cont_nav {
    background-color: transparent;
    border-top: 1px solid #ffffff4d;
    padding: 12px 0;
}

.pixels_1 {
    font-size: 10px;
    color: var(--text-secondary);
    margin: 0;
}

#cont_nav .nav-link {
    font-size: 9px;
    color: var(--primary);
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#cont_nav .nav-link:hover {
    color: var(--lime);
    text-shadow: 0 0 10px rgba(166, 255, 0, 0.6);
}

.cursor_page {
    cursor: pointer;
    text-decoration: none;
}

#about {
    padding-left: 20px !important;
}

.project-status {
    color: #a6ff00;
}

/* ============ Main Container ============ */
#main_container {
    background-color: transparent;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: none;
    border-radius: 0;
}

/* ============ Wall Info Section ============ */
.wall-info {
    width: 1000px;
    margin: 24px auto;
    padding: 16px;
    background-color: #202124;
    border: 2px solid var(--primary);
    border-radius: 4px;
}

.wall-info .circle {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

.wall-info .reserved-blocks,
.wall-info .selected-blocks,
.wall-info .purchased-blocks {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background-color: rgba(26, 0, 51, 0.6);
    border: 1px solid var(--primary);
    border-radius: 3px;
}

.wall-info p {
    font-size: 9px;
    color: var(--text-secondary);
    margin: 0;
}

.wall-info .selected-blocks-count {
    min-width: 20px;
    height: 20px;
    border-radius: 2px;
    color: var(--bg);
    background-color: var(--lime);
    font-size: 8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 6px rgba(166, 255, 0, 0.5);
}

.wall-info .circle {
    width: 14px;
    height: 14px;
    border-radius: 0;
    flex-shrink: 0;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.wall-info .reserved-blocks,
.wall-info .selected-blocks,
.wall-info .purchased-blocks {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background-color: #202124;
    border-radius: 0;
    border: 1px solid var(--primary);
}

.wall-info .reserved-blocks {
    margin-left: 0;
}

.wall-info .selected-blocks {
    margin-left: 12px;
}

.wall-info p {
    margin: 0;
    font-size: 11px;
    color: var(--text-gray);
    font-weight: 500;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.4);
}

.selected-blocks .circle {
    background-color: #B9DFF9;
}

.wall-info .selected-blocks-count {
    min-width: 20px;
    height: 20px;
    border-radius: 0;
    color: var(--bg-dark);
    background-color: var(--lime);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.pull-away {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.wall-actions {
    display: flex;
    gap: 10px;
}

/* ============ Buttons ============ */
.btn {
    border-radius: 3px;
    font-weight: 700;
    font-size: 9px;
    padding: 10px 16px;
    transition: all 0.15s ease;
    border: 2px solid;
    cursor: pointer;
    font-family: 'Press Start 2P', monospace;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn:hover {
    transform: scale(1.03);
}

.purchase-blocks:hover {
    background-color: var(--bs-btn-bg) !important;
    border-color: var(--bs-btn-border-color) !important;
}

.btn-success {
    background-color: var(--lime);
    color: var(--bg);
    border-color: var(--lime);
    box-shadow: 0 0 8px rgba(166, 255, 0, 0.4);
}

.btn-success:hover {
    background-color: var(--lime-dark);
    border-color: var(--lime-dark);
    box-shadow: 0 0 12px rgba(166, 255, 0, 0.6);
}

.btn-danger {
    background-color: var(--accent);
    color: var(--text);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(157, 78, 221, 0.4);
}

.btn-danger:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-light);
    box-shadow: 0 0 12px rgba(199, 125, 255, 0.6);
}

/* Upload Options */
.upload-image-option {
    height: 120px;
    border: 3px solid var(--primary);
    color: var(--primary);
    font-size: 10px;
    align-content: center;
    text-align: center;
    user-select: none;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
    background-color: rgba(45, 27, 78, 0.6);
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.upload-image-option:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: var(--lime);
    color: var(--lime);
    text-shadow: 0 0 10px rgba(166, 255, 0, 0.6);
    transform: scale(1.02);
}

/* ============ Image Preview ============ */
#imagePreview {
    border-radius: 3px;
    max-height: 600px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    border: 2px solid var(--primary);
}

#deleteUploadedImage {
    width: 32px;
    height: 32px;
    border-radius: 2px;
    position: absolute;
    top: 12px;
    right: 20px;
    background-color: var(--accent);
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 0 8px rgba(157, 78, 221, 0.5);
    border: 1px solid var(--accent);
}

#deleteUploadedImage:hover {
    background-color: var(--accent-light);
    transform: scale(1.12);
}

#deleteUploadedImage svg {
    width: 18px;
    height: 18px;
    fill: var(--text);
}

.imagePreviewCon {
    min-height: 300px;
    position: relative;
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
    background-color: rgba(45, 27, 78, 0.5);
    border: 1px solid #3f2667;
}

.imagePreviewCon.active {
    display: flex;
}

/* ============ Canvas Editor ============ */
#canvas-container {
    position: relative;
    display: inline-block;
    border: 3px solid var(--primary);
    background-color: #0d0015;
    margin-left: 92px;
    border-radius: 3px;
}

#canvas-container>canvas {
    display: block;
    background-color: #0d0015;
}

#canvas-container .resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    border-radius: 1px;
}

#canvas-container .resize-handle.bottom-right {
    bottom: -6px;
    right: -6px;
    cursor: nwse-resize;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

#editorModal .modal-dialog {
    width: 90vw;
    height: 80vh;
    max-width: unset !important;
}

#editorModal .modal-dialog .modal-content {
    height: 100%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    background-color: rgba(26, 0, 51, 0.95);
}

#editorModal .modal-header {
    border-bottom: 2px solid var(--primary);
    padding: 16px;
    background-color: rgba(45, 27, 78, 0.8);
}

#editorModal .modal-body {
    background-color: #202124;
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    padding: 0;
    position: relative;
}

#editorModal .modal-body .edit-tools-con {
    width: 90px;
    position: absolute;
    background-color: rgba(26, 0, 51, 0.9);
    border-right: 2px solid var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#editorModal .modal-body .edit-tools-con .first-con,
#editorModal .modal-body .editor-colors {
    display: flex;
    flex-wrap: wrap;
}

#editorModal .modal-body .edit-tools-con .tool-item {
    flex: 0 0 50%;
    border: 1px solid #3f2667;
    display: grid;
    place-content: center;
    aspect-ratio: 1/1;
    cursor: pointer;
    transition: all 0.1s ease;
}

.tool-item img {
    filter: invert(1);
}

#editorModal .modal-body .edit-tools-con .tool-item:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

#editorModal .modal-body .edit-tools-con .tool-item.active {
    background-color: var(--primary);
}

#editorModal .modal-body .edit-tools-con .tool-item.active img {
    filter: invert(1);
}

#editorModal .modal-body .editor-colors {
    display: flex;
    flex-wrap: wrap;
    padding: 6px;
}

#editorModal .modal-body .editor-colors .color-item {
    border: 3px solid transparent;
    margin: 4px;
    width: calc(50% - 8px);
    aspect-ratio: 1/1;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.1s ease;
}

#editorModal .modal-body .editor-colors .color-item:hover {
    border-color: var(--primary);
}

#editorModal .modal-body .editor-colors .color-item.active {
    border-color: var(--lime);
    box-shadow: 0 0 8px rgba(166, 255, 0, 0.6);
}

#editorModal .modal-body .edit-tools-con .icon {
    width: 20px !important;
    height: 20px !important;
}

#saveEditorDesign {
    width: 75px;
    margin: 8px 5px;
    border-radius: 4px;
    font-weight: 600;
}

/* ============ Payment Modal ============ */
.wallet-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 98%;
    margin: 24px auto;
}

.wallet-buttons button {
    height: 50px;
    border-radius: 3px;
    border: 2px solid var(--primary);
    background-color: rgba(26, 0, 51, 0.95);
    color: var(--lime);
    font-weight: 700;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.wallet-buttons button:hover {
    border-color: var(--lime);
    color: var(--lime);
    box-shadow: 0 0 10px rgba(166, 255, 0, 0.4);
    transform: scale(0.5);
}

.wallet-buttons button img {
    width: 24px;
    height: 24px;
}

/* ============ Loaders ============ */
.gridContainer {
    position: relative;
    background-color: #202124;
    width: 1000px;
    margin-inline: auto;
}

.gridContainer .loader-overlay {
    background-color: rgba(26, 0, 51, 0.98);
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 99999;
}

.loader {
    width: 100px;
    height: 100px;
    position: relative;
}

.loader:before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 100%;
    height: 100%;
    border: 10px solid transparent;
    border-top-color: var(--primary);
    border-radius: 100%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============ Toast Notifications ============ */
.toast {
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 10px;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    width: 450px;
    background-color: transparent !important;
    border: none !important;
    z-index: 99999;
}

.toast__message {
    position: relative;
    color: var(--text);
    background-color: rgba(26, 0, 51, 0.95);
    width: 100%;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border: 2px solid var(--primary);
    animation: toast 3s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
    font-size: 8px;
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.toast__icon {
    background-color: transparent;
    width: 45px !important;
    height: 45px !important;
    border: 2px solid var(--primary);
    color: var(--primary);
    display: grid;
    place-items: center;
    max-width: none;
    min-width: 45px;
    flex-shrink: 0;
    border-radius: 2px;
}

.toast__icon svg {
    height: 24px;
    width: 24px;
}

.toast__heading {
    margin-bottom: 4px;
    font-size: 8px;
    font-weight: 700;
    color: var(--primary);
}

.toast__close {
    font-size: 20px;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.15s ease;
    line-height: 1;
}

.toast__close:hover {
    color: var(--lime);
}

/* Toast Message Types */
.toast__message--error {
    border-color: var(--accent);
    color: var(--accent);
}

.toast__message--error .toast__icon {
    border-color: var(--accent);
    color: var(--accent);
}

.toast__message--error .toast__heading {
    color: var(--accent);
}

.toast__message--warning {
    border-color: var(--lime);
    color: var(--lime);
}

.toast__message--warning .toast__icon {
    border-color: var(--lime);
    color: var(--lime);
}

.toast__message--warning .toast__heading {
    color: var(--lime);
}

.toast__message--success {
    border-color: var(--primary);
    color: var(--text);
}

.toast__message--success .toast__icon {
    border-color: var(--primary);
    color: var(--primary);
}

.toast__message--success .toast__heading {
    color: var(--primary);
}

@keyframes toast {
    0% {
        transform: translateX(400px);
        opacity: 0;
    }

    10%,
    90% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ============ Footer ============ */
footer {
    margin-top: 40px;
    padding: 24px;
    text-align: center;
    background-color: rgba(26, 0, 51, 0.8);
    border-top: 2px solid var(--primary);
}

footer p {
    font-size: 7px;
    color: var(--text-secondary);
    margin: 0;
    letter-spacing: 1px;
}

/* ============ Modal Styling ============ */
.modal-content {
    border: 3px solid var(--primary);
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    background-color: rgba(26, 0, 51, 0.95);
}

.modal-header {
    border-bottom: 2px solid var(--primary);
    padding: 16px;
    background-color: rgba(45, 27, 78, 0.8);
}

.modal-body {
    padding: 24px;
    background-color: #202124;
}

.modal-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 11px;
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
}

.canvas-dimensions {
    color: var(--primary);
}

.btn-close {
    color: var(--primary);
    transition: all 0.15s ease;
    border: 1px solid var(--primary);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.btn-close:hover {
    color: var(--lime);
    border-color: var(--lime);
    box-shadow: 0 0 6px rgba(166, 255, 0, 0.4);
}

/* Forms */
input.form-control,
textarea.form-control {
    background-color: transparent !important;
    border: 2px solid var(--primary) !important;
    color: var(--text) !important;
    font-family: 'Press Start 2P', monospace !important;
    font-size: 14px !important;
    border-radius: 2px !important;
}

input.form-control:focus,
textarea.form-control:focus {
    background-color: rgba(45, 27, 78, 0.8) !important;
    border-color: var(--lime) !important;
    color: var(--lime) !important;
    box-shadow: 0 0 8px rgba(166, 255, 0, 0.3) !important;
}

label {
    color: var(--primary) !important;
    font-family: 'Press Start 2P', monospace !important;
    font-size: 12px !important;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.form-group {
    margin-bottom: 16px;
}

/* timer  */
/* ===========================
   Bottom Right Timer Card
=========================== */

#countdown-card {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 220px;
    background: rgba(26, 0, 51, 0.95);
    border: 2px solid var(--primary);
    border-radius: 3px;
    padding: 14px 16px;
    font-family: 'Press Start 2P', monospace;
    z-index: 9999;
    display: none;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

/* Title */
#countdown-card .timer-title {
    font-size: 8px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

/* Big Timer */
#countdown-card .timer-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--lime);
    margin-bottom: 4px;
}

/* Sub text */
#countdown-card .timer-sub {
    font-size: 7px;
    color: var(--text-secondary);
}

/* Small screens */
@media (max-width: 600px) {
    #countdown-card {
        right: 10px;
        bottom: 10px;
        width: 190px;
    }

    #countdown-card .timer-value {
        font-size: 28px;
    }
}

.timer-warning {
    animation: pulse 1s infinite;
    color: #d32f2f !important;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* block tooltip  */
.block-tooltip {
    position: fixed;
    z-index: 99999;
    width: 260px;
    background: rgba(26, 0, 51, 0.95);
    border: 2px solid var(--primary);
    border-radius: 3px;
    padding: 12px;
    font-family: 'Press Start 2P', monospace;
    pointer-events: auto;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.block-tooltip .tt-title {
    font-size: 8px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.block-tooltip .tt-desc {
    font-size: 7px;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-bottom: 8px;
}

.block-tooltip .tt-url {
    font-size: 7px;
    color: var(--lime);
    font-weight: 700;
    margin-top: 6px;
    word-break: break-word;
}

.block-tooltip .tt-hint {
    font-size: 6px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* =========================
   Payment Loader Overlay
========================= */

.payment-loader {
    position: fixed;
    inset: 0;
    background: rgba(26, 0, 51, 0.98);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.payment-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(212, 175, 55, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 100%;
    animation: spin 0.9s linear infinite;
}

.payment-loader-text {
    font-size: 9px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Press Start 2P', monospace;
}

.payment-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Spinner */
.payment-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(0, 255, 0, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 0;
    animation: payment-spin 0.9s linear infinite;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

@keyframes payment-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Text */
.payment-loader-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    font-family: "Press Start 2P", monospace;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
}

/* Optional subtle fade */
.payment-loader {
    animation: paymentFadeIn 0.2s ease;
}

@keyframes paymentFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============ Go Back Button ============ */
.go-back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: rgba(45, 27, 78, 0.8);
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.15s ease;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.go-back-btn:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: var(--lime);
    color: var(--lime);
    box-shadow: 0 0 12px rgba(166, 255, 0, 0.4);
}

.arrow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.arrow-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* ============ Utilities ============ */
.pull-away {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.d-flex {
    display: flex;
}

.bg-warning {
    background-color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--lime) !important;
}

/* ============ Responsive Adjustments ============ */
@media (max-width: 768px) {
    #pixelGrid {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .wall-info {
        width: 100%;
    }

    #countdown-card {
        width: 160px;
        padding: 10px 12px;
    }

    .navbar-text {
        font-size: 9px;
        margin-top: 0;
    }
}