:root {
    --bg: #030303;
    --fg: #ffffff;
    --line: #2a2a2a;
    --accent: #aec6cf;
    --error: #ffb3ba;
    --warning: #fdfd96;
    --success: #b2fab4;
    --font: 'Courier New', Courier, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--line);
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.header {
    border-bottom: 1px solid var(--line);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    z-index: 10;
}

.title-tag {
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 2px;
}

.cell .title-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    pointer-events: none;
    z-index: 10;
}

.btn {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--line);
    padding: 6px 12px;
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
    letter-spacing: 1px;
}

.btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(174, 198, 207, 0.05);
}

.btn:disabled {
    color: #333;
    border-color: #333;
    cursor: not-allowed;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100vw;
    height: 100vh;
}

.cell {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg);
    text-align: center;
    padding: 15px;
    overflow: hidden;
}

.cell:nth-child(4n) {
    border-right: none;
}

.github-link {
    text-decoration: none;
    color: var(--fg);
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 10px 20px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.github-link svg {
    fill: var(--fg);
    width: 20px;
    height: 20px;
    transition: fill 0.3s;
    position: relative;
    z-index: 2;
}

.github-link span {
    position: relative;
    z-index: 2;
}

.github-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--fg);
    transition: left 0.3s cubic-bezier(0.1, 0.7, 0.1, 1);
    z-index: 0;
}

.github-link:hover {
    color: var(--bg);
    font-weight: bold;
}
.github-link:hover svg {
    fill: var(--bg);
}

.github-link:hover::before {
    left: 0;
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
    }

    .grid {
        display: flex;
        flex-direction: column;
        width: 100vw;
        height: auto;
    }

    .cell {
        width: 100vw;
        border-right: none;
        border-bottom: 1px solid var(--line);
        flex: none;
    }
    
    .cell:last-child {
        border-bottom: none;
    }
}