/* General Body and Font Styles */
body {
    background-color: #121212;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 20px;
}

body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

body.dragging {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Main Container and Header */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
}

.main-header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    color: #00ffff;
    text-shadow: 3px 3px 6px #000000;
    margin-bottom: 1rem;
}

.main-header p {
    color: #aaa;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.header-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1rem auto;
}

:root {
    --window-bg-color: #8bac0f;
    --text-color: #0f380f;
}

.header-content-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.prizes-container {
    text-align: center;
}

.dial-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dial-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: #00ff99;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px #00ff99;
}

.dial {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #2a2a2a;
    border: 2px solid #555;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.7), 0 2px 2px rgba(255,255,255,0.1);
    cursor: pointer;
    outline: none;
    transition: transform 0.2s;
    position: relative; /* For pseudo-element */
}

.dial::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 20px;
    background: #00ff99;
    box-shadow: 0 0 5px #00ff99;
    border-radius: 2px;
    top: 5px; /* Position it near the top */
    left: calc(50% - 2px); /* Center it */
}

.dial::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 60px; /* Make thumb cover the whole dial for better UX */
    height: 60px;
    background: transparent;
    border: 0;
}

.dial::-moz-range-thumb {
    width: 60px;
    height: 60px;
    background: transparent;
    border: 0;
}

.prizes-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: #00ff99;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px #00ff99;
}

.prizes-window {
    background-color: var(--window-bg-color);
    color: var(--text-color);
    border: 2px solid var(--text-color);
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.5);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    padding: 10px;
    border-radius: 3px;
    font-family: 'Digital-7 Mono', sans-serif;
    font-size: 1.5rem; /* Slightly larger for better visibility */
    min-width: 200px; /* 20% reduction */
    text-align: center; /* Center the readout text */
    line-height: 1.5;
}

/* Menu Grid Layout */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Menu Card Styles */
.menu-card {
    position: relative; /* Needed for absolute positioning of the marquee */
    overflow: hidden; /* Hide the parts of the marquee outside the card */
    display: block;
    padding: 2rem;
    background-color: var(--window-bg-color); /* Linked to dial */
    border: 2px solid var(--text-color);       /* Linked to dial */
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.5);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);                  /* Linked to dial */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
}

.card-marquee-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.card-marquee-svg svg {
    width: 100%;
    height: 100%;
}

.card-marquee-svg text {
    fill: #000000; /* Black */
    font-family: 'Digital-7 Mono', sans-serif;
    font-size: 7px; /* Increase by 1px */
    text-transform: uppercase;
}

.card-marquee-svg textPath {
    /* Animation will be handled by JavaScript */
}

.menu-card:hover {
    /* Remove hover effect for the new style */
}

.menu-card h3 {
    font-family: 'Digital-7 Mono', sans-serif;
    font-size: 1.8rem; /* Make title larger */
    color: var(--text-color);
    margin-bottom: 0.75rem;
    text-shadow: none; /* Remove text shadow */
}

.menu-card p {
    font-family: 'Digital-7 Mono', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.5;
}


/* Container for layout */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    border: 2px solid #39FF14;
    box-shadow: 0 0 15px #39FF14;
}

/* Headings */
h1, h2, h3 {
    color: #FF1493; /* Bright Pink */
    text-shadow: 0 0 5px #FF1493;
    margin-top: 0;
}

/* Links */
a {
    color: #00FFFF; /* Cyan */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
button {
    background-color: #39FF14;
    color: #000;
    border: 2px solid #39FF14;
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 0 10px #39FF14;
    transition: all 0.2s ease-in-out;
}

button:hover {
    background-color: #000;
    color: #39FF14;
}

button:disabled {
    background-color: #333;
    color: #777;
    border-color: #555;
    box-shadow: none;
    cursor: not-allowed;
}

/* Inputs, Selects, and Textareas */
input[type="text"], input[type="number"], select {
    background-color: #1a1a1a;
    color: #39FF14;
    border: 1px solid #39FF14;
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    margin: 5px;
}

/* Control Group for alignment */
.control-group {
    margin-bottom: 20px;
}

/* Tables used in Screener */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    border: 1px solid #39FF14;
    padding: 8px;
    text-align: left;
    word-break: break-all;
}

th {
    background-color: #39FF14;
    color: #000;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background: linear-gradient(to bottom, #2a2a2a, #1c1c1c);
    margin: 5% auto;
    padding: 2.5rem;
    border: 1px solid #444;
    border-top-color: #555;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.modal-content h2 {
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 1.5rem;
    text-align: center;
}

.scrollable-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 15px; /* For scrollbar */
    margin-bottom: 1.5rem;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    background-color: #1c1c1c;
}

.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: #1c1c1c;
    border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.rect-button {
    display: inline-block;
    background: linear-gradient(to bottom, #00ff99, #00cc7a);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    align-self: center;
}

.rect-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    background: linear-gradient(to bottom, #00ffaa, #00e68a);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #FF1493;
    text-decoration: none;
    cursor: pointer;
}

/* Specific styles for Creator Hub */
.token-item {
    padding: 10px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.token-item:hover {
    background-color: #1a1a1a;
}
.token-item.selected {
    background-color: #39FF14;
    color: #000;
    font-weight: bold;
}
.management-section {
    margin-top: 20px;
    padding: 15px;
    border: 1px dashed #39FF14;
}
.management-section img {
    border: 1px solid #39FF14;
    float: left;
    margin-right: 20px;
}

/* --- Responsive Design & Media Queries --- */

/* For tablets and smaller desktops */
@media (max-width: 992px) {
    .main-container {
        padding: 1.5rem;
    }
}

/* For mobile devices */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
        margin: 1rem auto;
    }

    .header-content-wrapper {
        grid-template-columns: 1fr; /* Stack the windows vertically */
        gap: 1rem;
    }

    .prizes-container:first-child,
    .prizes-container:last-child {
        text-align: center; /* Center all windows on mobile */
    }

    .menu-grid {
        grid-template-columns: 1fr; /* Stack cards vertically */
        gap: 1rem;
    }

    .menu-card {
        padding: 1.5rem;
    }

    .prizes-window {
        font-size: 1.2rem;
        min-width: auto; /* Allow it to shrink */
        width: 100%;
    }

    .prizes-label {
        font-size: 0.6rem;
    }
}
