/*Fontok importálása*/
@import url(https://fonts.googleapis.com/css?family=Audiowide);
/*ALAP STÍLUSOK*/

* {
    box-sizing: border-box;
}

body {
    background-color: #d2d0d0;
    margin: 0;
    padding: 0;
    font-family: 'Audiowide', Arial, sans-serif;
    line-height: 1.6;
    color: #222;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* LOGÓ */

.logo {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    position: relative;
}

.logo img {
    max-width: 180px;
    width: 100%;
    height: auto;
}

/* FŐMENÜ */
nav ul.menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    justify-content: center;
    gap: 20px;
}

nav ul.menu li {
    flex: 0 0 45%; /* mobil: 2x2 */
    text-align: center;
}

nav ul.menu li img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: 0.2s;
}

nav ul.menu li img:hover {
    border: 2px solid black;
}

/* JÁTÉK OLDAL KÉPEK */

.menu-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* FŐ TARTALMI DOBOZ */

.chess-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 15px;
    background: #ffffffcc;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.page-title {
    text-align: center;
    color: #111;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.section-title {
    color: #333;
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: bold;
}

.section-text {
    margin-bottom: 15px;
    font-size: 1rem;
}

/* SZABÁLYOK ÉS KÉPEK - BALRA IGAZÍTOTT SZÖVEG, JOBBRA KÉP */

.rule-block-left {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.rule-block-left .rule-text {
    flex: 1;
    width: 50%;
    text-align: left;
}

.rule-block-left .rule-img {
    flex: 1;
    width: 50%;
    align-self: flex-start;
}

.piece-title {
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 8px;
}

.special-title {
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 8px;
}

/* TANULÁS DOBOZOK */

.learning-box {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #444;
}

.learning-box h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.1rem;
}

.learning-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.learning-box li {
    margin-bottom: 8px;
}

.learning-box a {
    color: #444;
    text-decoration: none;
    border-bottom: 1px solid #444;
    transition: color 0.2s;
}

.learning-box a:hover {
    color: #222;
}

/* GOMBOK */

.btn-home, .btn-top {
    display: block;
    margin: 20px auto;
    padding: 12px 25px;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Audiowide', Arial, sans-serif;
    font-weight: bold;
    text-align: center;
    width: fit-content;
    transition: background-color 0.3s;
    text-decoration: none;
}

.btn-home:hover, .btn-top:hover {
    background-color: #222;
}

.btn {
    font-family: 'Audiowide', Arial, sans-serif;
}

.google-font {
    font-family: 'Audiowide', Arial, sans-serif;
}

/* QUIZ STÍLUSOK */

.quiz-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.quiz-question {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

#answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-btn {
    padding: 12px;
    background: #eaeaea;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    transition: 0.2s;
    font-family: 'Audiowide', Arial, sans-serif;
}

.answer-btn:hover {
    background: #dcdcdc;
}

.answer-btn.correct {
    background: #82d676;
    color: white;
}

.answer-btn.wrong {
    background: #e86e6e;
    color: white;
}

.next-btn {
    padding: 12px 25px;
    margin: 20px auto 0;
    display: block;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Audiowide', Arial, sans-serif;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.next-btn:hover {
    background-color: #222;
}

.quiz-result-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.quiz-score {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 20px;
}

.restart-btn {
    padding: 12px 25px;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Audiowide', Arial, sans-serif;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.restart-btn:hover {
    background-color: #222;
}

.hidden {
    display: none;
}

#question-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 15px auto;
}

/*LOGIN ÉS REGISZTRÁCIÓ FORMOK*/

.chess-container form {
    background-color: #ffffffcc;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 400px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chess-container form label {
    font-weight: bold;
    color: #333;
    font-size: 0.95rem;
}

.chess-container form input {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s, box-shadow 0.3s;
    font-family: Arial, sans-serif;
}

.chess-container form input:focus {
    border-color: #444;
    box-shadow: 0 0 5px rgba(68,68,68,0.4);
    outline: none;
}

.chess-container form button {
    padding: 12px 25px;
    background-color: #444;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-family: 'Audiowide', Arial, sans-serif;
}

.chess-container form button:hover {
    background-color: #222;
    transform: translateY(-2px);
}

.chess-container form .message {
    font-size: 14px;
    color: rgb(24, 154, 35);
    text-align: center;
}

/* HEADER AKCIÓK */

.header-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 1200;
}

.header-actions .btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 12px;
    font-size: 0.95rem;
    border-radius: 6px;
    background-color: #444;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s;
}

.header-actions .btn-home:hover {
    background-color: #222;
}

/* HAMBURGER MENÜ */

.hamburger-container {
    position: relative;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 6px;
    color: #111;
    transition: color 0.2s;
}

.hamburger-btn:hover {
    color: #444;
}

.hamburger-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 36px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    z-index: 1300;
    min-width: 140px;
}

.hamburger-menu.active {
    display: block;
}

.hamburger-menu ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.hamburger-menu a {
    display: block;
    padding: 10px 14px;
    color: #111;
    text-decoration: none;
    transition: background-color 0.2s;
}

.hamburger-menu a:hover {
    background: #f5f5f5;
}

/* TÁBLÁZATOK */

.chess-table,
.chess-table-resp {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Audiowide', Arial, sans-serif;
    margin: 20px 0;
}

.chess-table thead,
.chess-table-resp thead {
    background-color: #444;
    color: #fff;
}

.chess-table th,
.chess-table td,
.chess-table-resp th, 
.chess-table-resp td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.chess-name-col {
    width: 50%;
}

.chess-elo-col {
    width: 25%;
    text-align: center;
}

.chess-country-col {
    width: 25%;
    text-align: center;
}

.chess-table tbody tr:nth-child(even),
.chess-table-resp tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.chess-table tbody tr:hover,
.chess-table-resp tbody tr:hover {
    background-color: #f1f1f1;
}

/* RESZPONZÍV TÁBLÁZAT */

@media screen and (max-width: 768px) {
    .chess-table thead,
    .chess-table-resp thead {
        display: none;
    }

    .chess-table, 
    .chess-table tbody, 
    .chess-table tr, 
    .chess-table td,
    .chess-table-resp, 
    .chess-table-resp tbody, 
    .chess-table-resp tr, 
    .chess-table-resp td {
        display: block;
        width: 100%;
    }

    .chess-table tr,
    .chess-table-resp tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #ddd;
        padding-bottom: 10px;
    }

    .chess-table td,
    .chess-table-resp td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid #eee;
    }

    .chess-table td::before,
    .chess-table-resp td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        font-weight: bold;
        text-align: left;
    }

    .chess-name-col,
    .chess-elo-col,
    .chess-country-col {
        width: 100%;
        text-align: right;
    }
}

/* MOBILON RESZPONZÍV */

@media (max-width: 480px) {
    .logo img {
        max-width: 150px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .chess-container {
        padding: 15px;
        margin: 10px;
    }

    .chess-container form {
        padding: 20px;
        margin: 10px;
    }

    .chess-container form input,
    .chess-container form button {
        font-size: 0.95rem;
        padding: 10px;
    }

    .rule-block {
        gap: 15px;
    }

    .rule-img {
        max-width: 100%;
    }

    .header-actions {
        top: 8px;
        right: 8px;
        gap: 6px;
    }

    .header-actions .btn-home {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .hamburger-btn {
        font-size: 20px;
        padding: 4px;
    }

    nav ul.menu li {
        flex: 0 0 100%;
    }

    .menu-image-container {
        gap: 15px;
    }
}

/* TABLET */

@media (min-width: 481px) and (max-width: 768px) {
    .logo img {
        max-width: 200px;
    }

    nav ul.menu li {
        flex: 0 0 45%;
    }

    .chess-container {
        padding: 25px;
    }

    .rule-block {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .rule-img {
        max-width: 45%;
        margin: 10px;
    }
}

/* DESKTOP */

@media (min-width: 769px) {
    .logo img {
        max-width: 260px;
    }

    nav ul.menu li {
        flex: 0 0 45%;
    }

    .chess-container {
        padding: 30px;
    }

    .rule-block {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .rule-text {
        flex: 1;
        max-width: 50%;
    }

    .rule-img {
        max-width: 45%;
        margin: 10px;
    }

    .menu-image-container img {
        max-width: 800px;
        width: 100%;
    }

    .chess-table th,
    .chess-table td,
    .chess-table-resp th,
    .chess-table-resp td {
        padding: 18px 20px;
    }
}