/* 90s Arcade Style CSS */

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

/* Base styles */
body {
    font-family: 'Press Start 2P', cursive;
    color: #fff;
    background-color: #000;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        url('../images/stars.jpeg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    padding-bottom: 60px;
    line-height: 1.6;
    font-size: 0.7rem; /* Reduced font size */
}

/* Apply arcade font to all text elements */
h1, h2, h3, h4, h5, h6, p, span, a, button, input, label, div, .card-title, .card-text, .lead, .btn {
    font-family: 'Press Start 2P', cursive !important;
}

/* Override Bootstrap dark text helpers for dark theme */
.text-muted,
.form-text {
    color: #b48ad4 !important;
}

/* Make text and icons inside links white */
a.text-decoration-none {
    color: #fff !important;
}

a.text-decoration-none i, 
a.text-decoration-none h3, 
a.text-decoration-none p {
    color: #fff !important;
}

/* Grid background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(rgba(124, 59, 178, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(180, 138, 212, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Neon text effects */
.neon-text {
    color: #fff;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #7c3bb2,
        0 0 20px #7c3bb2,
        0 0 25px #7c3bb2,
        0 0 30px #7c3bb2,
        0 0 35px #7c3bb2;
    animation: neon-pulse 1.5s infinite alternate;
    font-size: 0.9em; /* Reduced font size */
}

.neon-text-pink {
    color: #fff;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #7c3bb2,
        0 0 20px #7c3bb2,
        0 0 25px #7c3bb2,
        0 0 30px #7c3bb2,
        0 0 35px #7c3bb2;
    animation: neon-pulse 1.5s infinite alternate;
    font-size: 0.9em; /* Reduced font size */
}

.neon-text-green {
    color: #fff;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #b48ad4,
        0 0 20px #b48ad4,
        0 0 25px #b48ad4,
        0 0 30px #b48ad4,
        0 0 35px #b48ad4;
    animation: neon-pulse 1.5s infinite alternate;
    font-size: 0.9em; /* Reduced font size */
}

@keyframes neon-pulse {
    from {
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 15px #7c3bb2,
            0 0 20px #7c3bb2,
            0 0 25px #7c3bb2,
            0 0 30px #7c3bb2,
            0 0 35px #7c3bb2;
    }
    to {
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 15px #b48ad4,
            0 0 20px #b48ad4,
            0 0 25px #b48ad4,
            0 0 30px #b48ad4,
            0 0 35px #b48ad4,
            0 0 40px #b48ad4;
    }
}

/* Arcade buttons */
.btn-arcade {
    font-family: 'Press Start 2P', cursive;
    padding: 8px 16px; /* Reduced padding */
    border: 2px solid #fff; /* Thinner border */
    background-color: #000;
    color: #fff;
    text-transform: uppercase;
    box-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff,
        0 0 20px #fff;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    font-size: 0.7rem; /* Reduced font size */
    white-space: normal; /* Allow text to wrap */
    text-align: center; /* Center text */
    word-wrap: normal; /* Don't break words */
    word-break: keep-all; /* Prevent breaking words */
    min-height: 40px; /* Ensure minimum height for multi-line text */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fix for icon alignment in buttons */
.btn-arcade i {
    position: relative;
    top: -2px; /* Position icons slightly higher to align with text */
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 5px; /* Add spacing between icon and text */
    color: #fff; /* Ensure icons are white */
}

/* Ensure Bootstrap icons are white and visible */
.btn-arcade .bi {
    color: #fff !important; /* Force white color for Bootstrap icons */
    font-size: 1rem; /* Keep icons readable regardless of button font-size */
}

.btn-arcade:hover {
    background-color: #000;
    color: #fff;
    box-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff,
        0 0 20px #fff,
        0 0 25px #fff;
    transform: translateY(-3px);
}

.btn-arcade:active {
    transform: translateY(0);
    box-shadow: 
        0 0 2px #fff,
        0 0 5px #fff,
        0 0 10px #fff;
}

/* Pixelated elements */
.pixel-border {
    border: 3px solid #fff; /* Thinner border */
    box-shadow: 
        0 0 0 3px #000,
        0 0 0 6px #fff;
    image-rendering: pixelated;
}

.pixel-card {
    background-color: rgba(0, 0, 0, 0.8);
    border: 3px solid #fff; /* Thinner border */
    box-shadow:
        0 0 0 3px #000,
        0 0 0 6px #fff,
        0 0 10px #7c3bb2;
    padding: 15px; /* Reduced padding */
    image-rendering: pixelated;
}

/* Force dark backgrounds on Bootstrap elements */
.card, .card-header, .card-body, .card-footer {
    background-color: transparent !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.table, .table th, .table td {
    background-color: transparent !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.carousel {
    background-color: transparent !important;
}

.form-control, .form-select {
    background-color: rgba(0, 0, 0, 0.6) !important;
    color: #fff !important;
    border-color: #7c3bb2 !important;
}

.form-control::placeholder {
    color: #b48ad4 !important;
}

.input-group-text {
    background-color: rgba(0, 0, 0, 0.6) !important;
    color: #fff !important;
    border-color: #7c3bb2 !important;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(124, 59, 178, 0.25) !important;
}

/* Arcade toggle switch - replaces all checkboxes */
.form-check {
    padding-left: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.form-check-input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 52px !important;
    height: 26px !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid #fff !important;
    border-radius: 0 !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    vertical-align: middle !important;
    margin-left: 0 !important;
    margin-right: 8px !important;
    background-image: none !important;
}

.form-check-input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 0;
    transition: all 0.3s;
}

.form-check-input[type="checkbox"]:checked {
    background-color: #7c3bb2 !important;
    border-color: #7c3bb2 !important;
    box-shadow: 0 0 8px #7c3bb2 !important;
}

.form-check-input[type="checkbox"]:checked::after {
    left: 28px;
    background-color: #fff;
}

.form-check-input[type="checkbox"]:focus {
    box-shadow: 0 0 0 0.25rem rgba(124, 59, 178, 0.25) !important;
    outline: none !important;
}

.form-check-label {
    cursor: pointer;
    vertical-align: middle;
}

.alert-info {
    background-color: rgba(124, 59, 178, 0.2) !important;
    color: #fff !important;
    border-color: #7c3bb2 !important;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.2) !important;
    color: #fff !important;
    border-color: #4CAF50 !important;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #fff !important;
    border-color: #ffc107 !important;
}

/* Arcade header */
.arcade-header {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
    letter-spacing: 1px; /* Reduced letter spacing */
    margin-bottom: 15px; /* Reduced margin */
    padding-bottom: 8px; /* Reduced padding */
    border-bottom: 3px solid #7c3bb2; /* Thinner border, purple color */
    position: relative;
    font-size: 0.9em; /* Reduced font size */
}

.arcade-header::after {
    content: '';
    position: absolute;
    bottom: -6px; /* Adjusted position */
    left: 0;
    width: 100%;
    height: 3px; /* Thinner line */
    background-color: #b48ad4; /* Light Purple color */
}

/* Navbar styling */
.navbar {
    background-color: #000 !important;
    border-bottom: 3px solid #7c3bb2; /* Thinner border, purple color */
}

.navbar-brand {
    font-family: 'Press Start 2P', cursive;
    color: #fff !important;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #7c3bb2;
    font-size: 0.8rem; /* Reduced font size */
}

.nav-link {
    font-family: 'Press Start 2P', cursive;
    color: #fff !important;
    text-shadow: 0 0 5px #7c3bb2;
    transition: all 0.3s;
    padding: 8px 12px !important; /* Reduced padding */
    margin: 0 4px; /* Reduced margin */
    font-size: 0.65rem; /* Reduced font size */
}

.nav-link:hover {
    color: #b48ad4 !important; /* Light Purple color */
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #b48ad4;
    transform: scale(1.05);
}

/* Calendar styling */
.calendar-container {
    background-color: rgba(0, 0, 0, 0.8);
    border: 3px solid #fff; /* Thinner border */
    box-shadow:
        0 0 0 3px #000,
        0 0 0 6px #fff,
        0 0 10px #7c3bb2;
    padding: 15px; /* Reduced padding */
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px; /* Reduced margin */
    font-size: 0.8rem; /* Reduced font size */
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px; /* Reduced gap */
    font-size: 0.7rem; /* Reduced font size */
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    border: 2px solid #7c3bb2; /* Purple color */
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.7rem; /* Reduced font size */
}

.calendar-day:hover {
    background-color: #7c3bb2; /* Purple color */
    box-shadow: 0 0 10px #7c3bb2;
}

.calendar-day.selected {
    background-color: #b48ad4; /* Light Purple color */
    border-color: #b48ad4;
    box-shadow: 0 0 10px #b48ad4;
    color: #000; /* Better contrast with light purple background */
}

.calendar-day.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal styling */
.modal-arcade {
    border: 3px solid #fff; /* Thinner border */
    box-shadow:
        0 0 0 3px #000,
        0 0 0 6px #fff,
        0 0 10px #7c3bb2;
    background-color: #000;
}

/* Modal design name styling */
#modal-design-name {
    font-size: 2.5em; /* Bigger font size for the modal design name */
    margin-bottom: 1rem;
}

.modal-arcade .modal-header {
    border-bottom: 3px solid #7c3bb2; /* Thinner border, purple color */
    background-color: #000;
}

.modal-arcade .modal-footer {
    border-top: 3px solid #b48ad4; /* Thinner border, light purple color */
    background-color: #000;
}

.modal-arcade .close {
    color: #fff;
    text-shadow: 0 0 5px #7c3bb2;
    font-size: 0.8rem; /* Reduced font size */
}

/* Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.blink {
    animation: blink 1s infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, 
        rgba(255,255,255,0.2), 
        rgba(255,255,255,0));
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* Status badges styling */
.badge-arcade-approved {
    background-color: #000;
    color: #fff;
    border: 1px solid #7c3bb2;
    padding: 4px 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    text-transform: uppercase;
    box-shadow: 0 0 5px #7c3bb2;
    text-shadow: 0 0 5px #7c3bb2;
    animation: pulse 2s infinite;
}

.badge-arcade-pending {
    background-color: #000;
    color: #b48ad4;
    border: 1px solid #b48ad4;
    padding: 4px 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    text-transform: uppercase;
    box-shadow: 0 0 5px #b48ad4;
    text-shadow: 0 0 5px #b48ad4;
    animation: blink 1.5s infinite;
}

/* Navbar toggler styling */
.navbar-toggler {
    border: 2px solid #7c3bb2 !important;
    background-color: #000 !important;
    position: relative;
    overflow: hidden;
    padding: 0.5rem;
    box-shadow:
        0 0 5px #fff,
        0 0 10px #7c3bb2,
        0 0 15px #7c3bb2;
    transition: all 0.3s;
}

.navbar-toggler:hover {
    box-shadow:
        0 0 8px #fff,
        0 0 15px #7c3bb2,
        0 0 20px #7c3bb2;
    transform: scale(1.05);
}

.navbar-toggler-icon {
    background-image: none !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler-icon::before {
    content: "MENU";
    font-family: 'Press Start 2P', cursive;
    color: #fff;
    font-size: 0.6rem;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #7c3bb2;
    animation: blink 1.5s infinite alternate;
}

/* Language toggle button */
.btn-lang-toggle {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    padding: 6px 10px;
    border: 2px solid #7c3bb2;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 5px #7c3bb2;
    box-shadow: 0 0 5px #7c3bb2, 0 0 10px rgba(124, 59, 178, 0.3);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.btn-lang-toggle:hover {
    background-color: #7c3bb2;
    color: #fff;
    box-shadow: 0 0 8px #7c3bb2, 0 0 15px rgba(124, 59, 178, 0.5);
    transform: scale(1.05);
    text-decoration: none;
}

/* Link styling */
.arcade-link {
    color: #7c3bb2;
    text-decoration: none;
    position: relative;
    transition: all 0.3s;
    text-shadow: 0 0 2px #7c3bb2;
}

.arcade-link:hover {
    color: #b48ad4;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #b48ad4;
}

/* Custom Alert Styles */
.alert-arcade-success {
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #7c3bb2;
    color: #fff;
    box-shadow: 0 0 10px #7c3bb2;
    text-shadow: 0 0 5px #7c3bb2;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    padding: 15px;
    border-radius: 5px;
}

.alert-arcade-error {
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #b48ad4;
    color: #fff;
    box-shadow: 0 0 10px #b48ad4;
    text-shadow: 0 0 5px #b48ad4;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    padding: 15px;
    border-radius: 5px;
}

/* Audio Player Button */
.audio-player-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.audio-toggle-btn {
    font-family: 'Press Start 2P', cursive;
    width: 50px;
    height: 50px;
    border: 2px solid #fff;
    background-color: #000;
    color: #fff;
    text-transform: uppercase;
    box-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #7c3bb2,
        0 0 20px #7c3bb2;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    animation: pulse 2s infinite alternate;
}

.audio-toggle-btn:hover {
    background-color: #7c3bb2;
    color: #fff;
    box-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #b48ad4,
        0 0 20px #b48ad4,
        0 0 25px #b48ad4;
    transform: translateY(-3px);
}

.audio-toggle-btn:active {
    transform: translateY(0);
    box-shadow:
        0 0 2px #fff,
        0 0 5px #fff,
        0 0 10px #b48ad4;
}

/* Autoplay blocked indicator */
.audio-toggle-btn.autoplay-blocked {
    animation: autoplay-blocked 0.5s ease-in-out 6;
    border-color: #ff0000;
    box-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #ff0000,
        0 0 20px #ff0000;
}

@keyframes autoplay-blocked {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(0); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        font-size: 0.55rem; /* Even smaller font size on mobile */
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }

    .btn-arcade {
        padding: 6px 12px;
        font-size: 0.55rem;
        min-height: 36px; /* Slightly smaller min-height for mobile */
        line-height: 1.2; /* Improve line spacing for wrapped text */
    }

    /* Improve button text display in card footers */
    .card-footer .btn-arcade {
        width: 100%; /* Full width in card footers */
        margin-bottom: 5px; /* Add space between stacked buttons */
    }

    /* Stack buttons in card footers on very small screens */
    @media (max-width: 480px) {
        .card-footer .d-flex {
            flex-direction: column;
        }

        .card-footer .btn-arcade {
            margin-right: 0 !important;
            margin-bottom: 8px;
        }
    }

    .navbar-collapse .navbar-nav {
        align-items: center !important;
        text-align: center;
    }

    .nav-link {
        padding: 12px 16px !important;
        font-size: 0.7rem;
    }

    .pixel-card {
        padding: 12px;
    }

    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0.5rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 1rem;
    }

    h4 {
        font-size: 0.9rem;
    }

    h5 {
        font-size: 0.8rem;
    }

    h6 {
        font-size: 0.7rem;
    }

    .audio-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .neon-text, .neon-text-pink, .neon-text-green {
        font-size: 0.7em;
    }

    /* Ensure modal design name remains large on mobile */
    #modal-design-name {
        font-size: 1.1em;
    }

    .arcade-header {
        font-size: 0.8em;
    }

    .navbar-brand {
        font-size: 0.7rem;
    }

    .badge-arcade-approved, .badge-arcade-pending {
        font-size: 0.5rem;
        padding: 3px 6px;
    }

    .alert-arcade-success, .alert-arcade-error {
        font-size: 0.6rem;
        padding: 12px;
    }

    /* Dropdown menu text size */
    .dropdown-menu .dropdown-item {
        font-size: 0.55rem;
        padding: 0.3rem 0.75rem;
    }

    /* Fix for hero buttons alignment in mobile view */
    .jumbotron .mt-4.fade-in-up {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .jumbotron .mt-4.fade-in-up a.btn {
        margin-right: 0 !important;
        margin-bottom: 10px;
        width: 80%;
    }
}

/* Arcade Custom Dialog */
.arcade-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.arcade-dialog-overlay.active {
    opacity: 1;
}

.arcade-dialog {
    background-color: #000;
    border: 3px solid #fff;
    box-shadow:
        0 0 0 3px #000,
        0 0 0 6px #7c3bb2,
        0 0 20px #7c3bb2,
        0 0 40px rgba(124, 59, 178, 0.3);
    padding: 0;
    max-width: 420px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.arcade-dialog-overlay.active .arcade-dialog {
    transform: scale(1);
}

.arcade-dialog-header {
    padding: 16px 20px 12px;
    border-bottom: 2px solid #7c3bb2;
    text-align: center;
}

.arcade-dialog-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.arcade-dialog-icon.success {
    color: #7c3bb2;
    text-shadow: 0 0 10px #7c3bb2, 0 0 20px #7c3bb2;
}

.arcade-dialog-icon.error {
    color: #ff4444;
    text-shadow: 0 0 10px #ff4444, 0 0 20px #ff4444;
}

.arcade-dialog-icon.warning {
    color: #FFEB3B;
    text-shadow: 0 0 10px #FFEB3B, 0 0 20px #FFEB3B;
}

.arcade-dialog-icon.info {
    color: #b48ad4;
    text-shadow: 0 0 10px #b48ad4, 0 0 20px #b48ad4;
}

.arcade-dialog-title {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 0.7rem;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 0 5px #7c3bb2;
    margin: 0;
}

.arcade-dialog-body {
    padding: 20px;
    text-align: center;
}

.arcade-dialog-message {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 0.6rem;
    color: #fff;
    line-height: 1.8;
    margin: 0;
}

.arcade-dialog-footer {
    padding: 12px 20px 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    border-top: 2px solid #7c3bb2;
}

.arcade-dialog-btn {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 0.6rem;
    padding: 10px 24px;
    border: 2px solid #fff;
    background-color: #000;
    color: #fff;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    min-width: 80px;
}

.arcade-dialog-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff;
}

.arcade-dialog-btn:active {
    transform: translateY(0);
}

.arcade-dialog-btn-confirm {
    border-color: #7c3bb2;
    box-shadow: 0 0 8px rgba(124, 59, 178, 0.5);
}

.arcade-dialog-btn-confirm:hover {
    background-color: #7c3bb2;
    box-shadow:
        0 0 5px #7c3bb2,
        0 0 10px #7c3bb2,
        0 0 20px #7c3bb2;
}

.arcade-dialog-btn-cancel {
    border-color: #666;
    color: #aaa;
    box-shadow: none;
}

.arcade-dialog-btn-cancel:hover {
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .arcade-dialog {
        max-width: 92%;
    }

    .arcade-dialog-title {
        font-size: 0.6rem;
    }

    .arcade-dialog-message {
        font-size: 0.5rem;
    }

    .arcade-dialog-btn {
        font-size: 0.5rem;
        padding: 8px 16px;
        min-width: 65px;
    }

    .arcade-dialog-icon {
        font-size: 1.4rem;
    }
}

/* iPad/Tablet specific styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .btn-arcade {
        white-space: normal;
        word-wrap: normal;
        word-break: keep-all;
        font-size: 0.65rem;
        padding: 8px 12px;
        width: auto;
        min-width: 100px; /* Ensure buttons have enough width for text */
    }

    /* Ensure modal design name remains large on tablets */
    #modal-design-name {
        font-size: 1.2em;
    }

    /* Ensure buttons in card footers have proper spacing */
    .card-footer .btn-arcade {
        margin-right: 5px;
        margin-bottom: 5px;
    }
}

/* Arcade D-Pad */
.dpad-container {
    display: grid;
    grid-template-columns: 52px 52px 52px;
    grid-template-rows: 52px 52px 52px;
    gap: 4px;
    user-select: none;
    -webkit-user-select: none;
}

.dpad-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border: 2px solid #7c3bb2;
    color: #b48ad4;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.1s;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.dpad-btn:active,
.dpad-btn.active {
    background: #7c3bb2;
    color: #fff;
    box-shadow: 0 0 12px #7c3bb2, inset 0 0 8px rgba(180, 138, 212, 0.3);
}

.dpad-up    { grid-column: 2; grid-row: 1; border-radius: 6px 6px 0 0; }
.dpad-left  { grid-column: 1; grid-row: 2; border-radius: 6px 0 0 6px; }
.dpad-center {
    grid-column: 2;
    grid-row: 2;
    background: #1a0a2e;
    border: 2px solid #7c3bb2;
    border-radius: 0;
}
.dpad-right { grid-column: 3; grid-row: 2; border-radius: 0 6px 6px 0; }
.dpad-down  { grid-column: 2; grid-row: 3; border-radius: 0 0 6px 6px; }

@media (max-width: 768px) {
    .dpad-container {
        grid-template-columns: 48px 48px 48px;
        grid-template-rows: 48px 48px 48px;
        gap: 3px;
    }
    .dpad-btn {
        font-size: 1rem;
    }
}
