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

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

body {
    font-family: 'Press Start 2P', cursive;
    background: #0f0f23;
    background-image:
        repeating-linear-gradient(0deg, rgba(255,0,255,0.05) 0px, transparent 1px, transparent 2px, rgba(255,0,255,0.05) 3px),
        repeating-linear-gradient(90deg, rgba(0,255,255,0.05) 0px, transparent 1px, transparent 2px, rgba(0,255,255,0.05) 3px);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    color: #ff00ff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow:
        0 0 10px #ff00ff,
        0 0 20px #ff00ff,
        0 0 30px #ff00ff,
        4px 4px 0 #00ffff;
    animation: flicker 2s infinite alternate;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    41.99% { opacity: 1; }
    42% { opacity: 0.8; }
    43% { opacity: 1; }
    45.99% { opacity: 1; }
    46% { opacity: 0.9; }
    46.5% { opacity: 1; }
}

.subtitle {
    color: #00ffff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.7em;
    text-shadow: 0 0 10px #00ffff;
}

.settings-container {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.settings-toggle {
    padding: 10px 20px;
    background: rgba(255, 255, 0, 0.1);
    color: #ffff00;
    border: 2px solid rgba(255, 255, 0, 0.3);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
    margin-bottom: 15px;
}

.settings-toggle:hover {
    background: rgba(255, 255, 0, 0.2);
    border-color: rgba(255, 255, 0, 0.6);
    transform: scale(1.05);
}

.settings-panel {
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(255, 255, 0, 0.3);
    padding: 20px;
    margin: 0 auto 20px;
    max-width: 600px;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.2);
}

.token-input {
    text-align: center;
    margin-bottom: 20px;
}

.token-message {
    color: #ffff00;
    font-size: 0.6em;
    margin-bottom: 10px;
}

.refresh-section {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.refresh-message {
    color: #00ffff;
    font-size: 0.6em;
    margin-bottom: 10px;
}

#github-token {
    padding: 10px;
    width: 300px;
    background: #1a1a2e;
    border: 2px solid #00ffff;
    color: #00ffff;
    font-family: monospace;
    font-size: 0.8em;
}

.btn-save {
    padding: 10px 20px;
    background: #00ffff;
    color: #0f0f23;
    border: 2px solid #00ffff;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 10px;
}

.btn-save:hover {
    background: #ff00ff;
    border-color: #ff00ff;
    color: #fff;
}

.filter-section {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #00ffff;
    font-size: 0.6em;
    cursor: pointer;
    text-shadow: 0 0 5px #00ffff;
    transition: all 0.3s;
}

.filter-checkbox:hover {
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

.filter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ff00ff;
}

.search-section {
    text-align: center;
    margin-bottom: 30px;
}

.search-input {
    padding: 12px 20px;
    width: 100%;
    max-width: 500px;
    background: #1a1a2e;
    border: 2px solid #ff00ff;
    color: #ff00ff;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
    transition: all 0.3s;
}

.search-input::placeholder {
    color: rgba(255, 0, 255, 0.5);
}

.search-input:focus {
    outline: none;
    border-color: #00ffff;
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.btn-refresh {
    padding: 10px 20px;
    background: #1a1a2e;
    color: #00ffff;
    border: 2px solid #00ffff;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.btn-refresh:hover {
    background: #00ffff;
    border-color: #ff00ff;
    color: #0f0f23;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    transform: scale(1.05);
}

.fork-count-info {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 12px 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    font-size: 0.6em;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    border-radius: 4px;
    grid-column: 1 / -1;
}

.loading, .error {
    text-align: center;
    color: #00ffff;
    padding: 30px;
    font-size: 0.8em;
    text-shadow: 0 0 10px #00ffff;
}

.error {
    background: rgba(255, 0, 100, 0.2);
    border: 2px solid #ff0066;
    box-shadow: 0 0 20px rgba(255, 0, 100, 0.3);
}

.forks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.fork-card {
    background: #1a1a2e;
    border: 3px solid #00ffff;
    padding: 20px;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    transition: all 0.3s;
    position: relative;
}

.fork-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 0 40px rgba(0, 255, 255, 0.6),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
    border-color: #ff00ff;
}

.fork-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.fork-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #ff00ff;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.fork-info h3 {
    margin: 0;
    font-size: 0.7em;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

.fork-info a {
    color: #00ffff;
    text-decoration: none;
    font-size: 0.65em;
    text-shadow: 0 0 5px #00ffff;
    padding: 8px 12px;
    border: 2px solid #00ffff;
    border-radius: 4px;
    display: inline-block;
    margin-top: 8px;
    transition: all 0.3s;
}

.fork-info a:hover {
    color: #0f0f23;
    background: #00ffff;
    text-shadow: none;
    border-color: #00ffff;
    transform: scale(1.05);
}

.fork-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.5em;
    color: #ffff00;
    padding: 6px 10px;
    background: rgba(255, 255, 0, 0.1);
    border: 1px solid rgba(255, 255, 0, 0.3);
    border-radius: 4px;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
    transition: all 0.3s;
}

.meta-item:hover {
    background: rgba(255, 255, 0, 0.2);
    border-color: rgba(255, 255, 0, 0.6);
    transform: scale(1.05);
}

.btn-play {
    width: 100%;
    padding: 15px;
    background: #ff00ff;
    color: #fff;
    border: 3px solid #00ffff;
    font-size: 0.7em;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: none;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.btn-play:hover {
    background: #00ffff;
    color: #0f0f23;
    border-color: #ff00ff;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
    transform: scale(1.05);
}

.game-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
}

.game-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    z-index: 1001;
}

.game-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    max-width: 70%;
}

.game-header h2 {
    color: #ff00ff;
    font-size: 1.2em;
    text-shadow: 0 0 20px #ff00ff;
    margin: 0;
}

.share-url {
    padding: 10px 14px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    font-family: monospace;
    font-size: 0.9em;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    transition: all 0.3s;
}

.share-url:focus {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.6);
}

.share-url:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.5);
}

.btn-close {
    background: #ff0066;
    color: #fff;
    border: 3px solid #ff00ff;
    padding: 12px 25px;
    font-size: 0.7em;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.btn-close:hover {
    background: #ff00ff;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
    transform: scale(1.05);
}

#game-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 85vh;
    max-width: 1200px;
    max-height: 900px;
    border: 5px solid #00ffff;
    box-shadow:
        0 0 40px rgba(0, 255, 255, 0.6),
        inset 0 0 40px rgba(0, 255, 255, 0.1);
    background: #000;
    overflow: hidden;
}

.footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px 20px;
    border-top: 2px solid rgba(0, 255, 255, 0.3);
}

.made-with-love {
    color: #ff00ff;
    font-size: 0.65em;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #ff00ff;
}

.made-with-love a {
    color: #00ffff;
    text-decoration: none;
    text-shadow: 0 0 5px #00ffff;
    transition: all 0.3s;
}

.made-with-love a:hover {
    color: #ff00ff;
    text-shadow: 0 0 15px #ff00ff;
}

.contribute {
    color: #00ffff;
    font-size: 0.6em;
    text-shadow: 0 0 5px #00ffff;
}

.contribute a {
    color: #ff00ff;
    text-decoration: none;
    text-shadow: 0 0 10px #ff00ff;
    padding: 8px 15px;
    border: 2px solid #ff00ff;
    border-radius: 4px;
    display: inline-block;
    margin-left: 8px;
    transition: all 0.3s;
}

.contribute a:hover {
    background: #ff00ff;
    color: #0f0f23;
    text-shadow: none;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}
