* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #121212;
    min-height: 100vh;
    color: #ffffff;
}

.center-viewport {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

h1 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.difficulty-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.difficulty-btn {
    background-color: #2d2d2d;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.difficulty-btn:hover {
    background-color: #3d3d3d;
}

.difficulty-btn.active {
    background-color: #3498db;
    color: white;
}

.problem-container {
    margin-bottom: 2rem;
}

.problem {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.input-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.answer-input {
    padding: 0.8rem;
    font-size: 1.2rem;
    border: 2px solid #3d3d3d;
    border-radius: 5px;
    width: 150px;
    text-align: center;
    background-color: #2d2d2d;
    color: #ffffff;
}

.answer-input:focus {
    outline: none;
    border-color: #3498db;
}

.answer-input::placeholder {
    color: #666666;
}

.result {
    font-size: 1.2rem;
    margin: 1rem 0;
    font-weight: bold;
}

.answer {
    font-size: 1.5rem;
    color: #27ae60;
    font-weight: bold;
    margin: 1rem 0;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    margin: 0.5rem;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.check-answer-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.check-answer-btn:hover {
    background-color: #2980b9;
}

.new-problem-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    margin-top: 1rem;
}

.new-problem-btn:hover {
    background-color: #229954;
}

/* Number Sequences Section */
.sequence-easy.active,
.sequence-medium.active,
.sequence-hard.active {
    background-color: #3498db;
    color: white;
}

/* Sudoku Section */
.sudoku-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 1rem 0;
    justify-content: center;
    align-items: center;
}

.sudoku-row {
    display: flex;
    gap: 2px;
}

.sudoku-cell {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #3d3d3d;
    background-color: #2d2d2d;
    color: #ffffff;
    border-radius: 5px;
}

.sudoku-cell:focus {
    outline: none;
    border-color: #3498db;
    background-color: #3d3d3d;
}

.sudoku-cell::placeholder {
    color: #666666;
}

.sudoku-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.clear-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.clear-btn:hover {
    background-color: #c0392b;
}

.ad-container {
    margin: 20px auto 0 auto;
    text-align: center;
    min-height: 100px;
    min-width: 320px;
    max-width: 500px;
    width: 100%;
    display: block;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    background-color: #1e1e1e;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.footer-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.cookie-content {
    margin: 20px 0;
    padding: 20px;
    background-color: #2d2d2d;
    border-radius: 8px;
    max-height: 70vh;
    overflow-y: auto;
}

.back-btn {
    background-color: #3498db;
    margin-top: 20px;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    background-color: #2980b9;
}

.wide-container {
    background-color: #1e1e1e;
    padding: 2.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: left;
    max-width: 950px;
    width: 95%;
    margin: 2rem auto;
    line-height: 1.7;
    font-size: 1.08rem;
}

.wide-container h1, .wide-container h2 {
    text-align: center;
}

.wide-container p, .wide-container ul, .wide-container li {
    margin-bottom: 1.1em;
}

.wide-container .back-btn {
    display: block;
    margin: 30px auto 0 auto;
    text-align: center;
    width: fit-content;
}

.link-boxes-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem auto 1rem auto;
    max-width: 700px;
}

.link-box {
    background-color: #23272f;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 1.2rem 2rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 180px;
}

.link-box a {
    color: #4fc3f7;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: color 0.2s;
}

.link-box:hover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}

.link-box a:hover {
    color: #81d4fa;
    text-decoration: underline;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}