:root {
    --bg: #020617;
    --accent: #38bdf8;
    --card-bg: rgba(30, 41, 59, 0.4);
    --border-light: rgba(255, 255, 255, 0.1);
    --grid-bg: #0f172a;
    --text-secondary: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: white;
    font-family: 'Inter', sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 30px;
    border: 1px solid var(--border-light);
    position: relative;
    max-width: 600px;
}

header { margin-bottom: 30px; }

h1 {
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 15px;
    letter-spacing: 4px;
    font-size: 1.8rem;
}

.accent { color: var(--accent); }

#grid {
    display: grid;
    grid-template-columns: repeat(9, 45px);
    grid-template-rows: repeat(9, 45px);
    gap: 0;
    background: #334155;
    border: 3px solid var(--accent);
    margin: 30px 0;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

input {
    width: 45px;
    height: 45px;
    background: var(--grid-bg);
    border: 1px solid #1e293b;
    color: white;
    text-align: center;
    font-size: 1.2rem;
    transition: background 0.3s;
}

input:hover:not(:disabled) {
    background: #1a2a3a;
}

input:focus {
    outline: 2px solid var(--accent);
    background: #1a2a3a;
}

/* 3x3 Box Borders */
input:nth-child(3n) { border-right: 3px solid var(--accent); }
input:nth-child(9n) { border-right: 1px solid #1e293b; }

input:nth-child(n+19):nth-child(-n+27),
input:nth-child(n+46):nth-child(-n+54) { 
    border-bottom: 3px solid var(--accent); 
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron';
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--accent);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #334155;
    padding: 12px 30px;
    border-radius: 8px;
    font-family: 'Orbitron';
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
    color: var(--accent);
    font-size: 0.9rem;
    transition: 0.3s;
    font-family: 'Orbitron';
}

.back-btn:hover {
    text-shadow: 0 0 10px var(--accent);
}