/* --- Futuristic "Game Hack" Theme --- */


/* --- Device Switching Logic --- */
@media (min-width: 769px) {
    #mobile-content { display: none !important; }
    body { background-color: #000; overflow: hidden; }
}

@media (max-width: 768px) {
    #desktop-view { display: none !important; }
}

/* --- TikTok Colors & Variables --- */
:root {
    --tt-red: #fe2c55;
    --tt-cyan: #25f4ee;
    --tt-black: #121212;
}

body {
    background-color: var(--tt-black);
    color: white;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

/* --- Glitch Text Effect --- */
.glitch-text {
    font-family: 'Share Tech Mono', monospace;
    color: #fff;
    text-shadow: 2px 0 0 var(--tt-red), -2px 0 0 var(--tt-cyan);
    text-transform: uppercase;
}

/* --- Desktop QR Styles --- */
#desktop-view {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.qr-wrapper {
    background: #1a1a1a;
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid #333;
}

#qrcode {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    margin: 20px 0;
}

/* --- Search & Game Cards (TikTok Style) --- */
.search-form input {
    background: #222;
    border: 1px solid #444;
    color: white;
    padding: 12px;
    border-radius: 8px;
}

.search-form button {
    background: var(--tt-red);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 3px 3px 0px var(--tt-cyan);
}

.game-card {
    background: #1f1f1f;
    border-radius: 12px;
    border: 1px solid #333;
    padding: 15px;
    text-decoration: none;
    color: white;
    transition: 0.2s;
}

.game-card:hover {
    border-color: var(--tt-cyan);
    transform: translateY(-5px);
}

.free-badge {
    background: linear-gradient(90deg, var(--tt-cyan), var(--tt-red));
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}



/* Import a retro, monospaced font */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

/* Keyframes for animations */
@keyframes flicker {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 5px #00f6ff, 0 0 10px #00f6ff, 0 0 15px #00f6ff;
  }
  50% {
    opacity: 0.8;
    text-shadow: 0 0 3px #00f6ff, 0 0 8px #00f6ff;
  }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* General Body & Font Styles */
body {
    font-family: 'Share Tech Mono', monospace;
    background-color: #0d1117; /* Very dark blue-gray */
    color: #c9d1d9;
    margin: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

a {
    color: #58a6ff;
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
    color: #00f6ff;
    text-shadow: 0 0 8px #00f6ff;
    text-decoration: none;
}

/* --- Home Page (index.html) --- */
.home-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid #30363d;
    padding-bottom: 2rem;
}

.home-header h1 {
    font-size: 3.5rem;
    color: #00f6ff;
    margin-bottom: 0.5rem;
    animation: flicker 3s infinite;
}

.home-header p {
    color: #8b949e;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.search-form {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1px;
}

.search-form input {
    width: 50%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    border-radius: 0;
    border: 1px solid #00f6ff;
    background-color: rgba(0, 246, 255, 0.05);
    color: #c9d1d9;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    box-shadow: inset 0 0 10px rgba(0, 246, 255, 0.2);
}

.search-form input::placeholder {
    color: #8b949e;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    border: 1px solid #00f6ff;
    border-radius: 0;
    background-color: #0d1117;
    color: #00f6ff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.search-form button:hover {
    background-color: #00f6ff;
    color: #0d1117;
    box-shadow: 0 0 15px #00f6ff;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: #161b22;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 1px solid #30363d;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    animation: fadeIn 0.5s ease-out forwards;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: #00f6ff;
    box-shadow: 0 0 20px rgba(0, 246, 255, 0.3);
}

.game-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    object-fit: cover;
    filter: drop-shadow(0 0 5px #00f6ff);
}

.game-card h3 {
    margin: 0.5rem 0;
    color: #00f6ff;
    font-size: 1.2rem;
}

.game-card p {
    margin: 0;
    color: #8b949e;
    font-size: 0.9rem;
}

/* --- Game Details Page (game.html) --- */
.game-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.game-header {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 1.5rem;
    border: 1px solid #00f6ff;
    box-shadow: 0 0 20px rgba(0, 246, 255, 0.3), inset 0 0 20px rgba(0, 246, 255, 0.2);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.game-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255,255,255,0) 50%, rgba(0,0,0,0.25) 50%), linear-gradient(90deg, rgba(255,0,0,0.06), rgba(0,255,0,0.02), rgba(0,0,255,0.06));
    background-size: 100% 4px, 6px 100%;
    z-index: 2;
    pointer-events: none;
}

.game-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    background: linear-gradient(to top, #0d1117, transparent);
}

.game-icon {
    width: 100px;
    height: 100px;
    border: 2px solid #00f6ff;
    filter: drop-shadow(0 0 10px #00f6ff);
}

.active-users {
    background-color: rgba(0, 246, 255, 0.1);
    border: 1px solid #00f6ff;
    color: #00f6ff;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.active-users svg {
    width: 1.2rem;
    height: 1.2rem;
}

/* Info Boxes */
.info-box-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.info-box {
    padding: 1rem;
    border: 1px solid #30363d;
    background-color: #161b22;
}
.info-box.slots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #00f6ff;
}
.info-box.slots h4 {
    margin: 0;
    font-size: 1rem;
    color: #c9d1d9;
}
.info-box.slots .slot-count {
    color: #ff7b72;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 0 5px #ff7b72;
}
.info-box.slots p {
    margin: 0;
    font-size: 0.8rem;
    color: #8b949e;
    max-width: 40%;
    text-align: right;
}
.info-box.warning {
    background-color: rgba(255, 123, 114, 0.1);
    border-color: #ff7b72;
    color: #ff7b72;
}
.info-box.warning p {
    margin: 0;
}

/* Main Content & Form */
.main-content {
    background-color: #161b22;
    padding: 1.5rem;
    border: 1px solid #30363d;
    min-height: 250px;
}

.progress-bar-container {
    width: 100%;
    background-color: #30363d;
    height: 4px;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 25%;
    height: 100%;
    background-color: #00f6ff;
    transition: width 0.5s ease-in-out;
    box-shadow: 0 0 8px #00f6ff;
}

.form-tabs {
    display: flex;
    border-bottom: 1px solid #30363d;
    margin-bottom: 1.5rem;
}
.tab {
    flex-grow: 1;
    text-align: center;
    padding: 0.5rem 0;
    color: #8b949e;
    position: relative;
    cursor: default;
    transition: color 0.2s;
}
.tab.active {
    color: #00f6ff;
}

.form-body label {
    display: block;
    margin-bottom: 0.5rem;
    color: #8b949e;
    text-transform: uppercase;
}
.form-body input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #30363d;
    background-color: #0d1117;
    color: #c9d1d9;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-body input[type="text"]:focus {
    outline: none;
    border-color: #00f6ff;
    box-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
}

.verify-btn {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #00f6ff;
    background-color: transparent;
    color: #00f6ff;
    font-size: 1.2rem;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    text-align: center;
    display: block;
}
.generate-code-btn {
    width: 90%;
    padding: 0.8rem;
    border: 1px solid #00f6ff;
    background-color: transparent;
    color: #00f6ff;
    font-size: 1.2rem;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    text-align: center;
    display: block;
}




.verify-btn:hover {
    background-color: #00f6ff;
    color: #0d1117;
    box-shadow: 0 0 15px #00f6ff;
}

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #30363d;
    border-top-color: #00f6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
.loader-container p {
    color: #00f6ff;
    text-transform: uppercase;
}

/* Step-specific styles */
.step-label {
    color: #8b949e;
    margin-bottom: 1rem;
}
.step-label .highlight {
    color: #c9d1d9;
    font-weight: bold;
}
.platform-selector {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}
.platform-btn {
    flex-grow: 1;
    padding: 1rem;
    background-color: #0d1117;
    border: 1px solid #30363d;
    color: #8b949e;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.platform-btn:hover {
    border-color: #00f6ff;
    color: #00f6ff;
}
.platform-btn.active {
    background-color: rgba(0, 246, 255, 0.1);
    border-color: #00f6ff;
    color: #00f6ff;
    box-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
}
.platform-btn svg {
    width: 24px;
    height: 24px;
}

/* Resource Sliders */
.resource-container { margin: 1.5rem 0; }
.resource-slider { margin-bottom: 1.5rem; }
.resource-info { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.resource-info .resource-icon { width: 24px; height: 24px; }
.resource-amount { margin-left: auto; color: #00f6ff; }
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #30363d;
    outline: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #00f6ff;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #0d1117;
    box-shadow: 0 0 5px #00f6ff;
}
.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00f6ff;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #0d1117;
}

/* Notice Box */
.notice-box {
    padding: 1.5rem;
    border: 1px solid;
    text-align: center;
}
.notice-icon { margin-bottom: 1rem; }
.notice-icon svg { width: 40px; height: 40px; color: #ffae00; }
.notice-title { margin-top: 0; font-size: 1.5rem; color: #fff; }
.notice-message { color: #c9d1d9; }
.notice-box input { margin: 1rem 0; text-align: center; }
.generate-code-btn { margin-bottom: 0.5rem; }

/* Recent Winner Notification */
.recent-winner {
    display: flex;
    gap: 1rem;
    background-color: rgba(46, 160, 67, 0.1);
    padding: 1rem;
    margin-top: 1.5rem;
    border: 1px solid #2ea043;
    color: #3fb950;
    clip-path: polygon(calc(0% + 10px) 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}
.winner-check {
    color: #3fb950;
}
.winner-check svg {
    width: 24px;
    height: 24px;
}
.winner-details p {
    margin: 0 0 0.5rem 0;
}
.resource-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    color: #c9d1d9;
}
.resource-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}
.in-game-text {
    font-size: 0.9rem;
    color: #8b949e;
    margin-top: 0.5rem !important;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    color: #8b949e;
}

/* Add this to the end of your existing style.css */

.error-message {
    color: #ff7b72; /* Use the warning color */
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
    animation: fadeIn 0.3s;
    height: 1em; /* Reserve space to prevent layout shift */
}
