/* =========================================
   GLOBAL
========================================= */

body {
    font-family: Arial, sans-serif;
    background:
        linear-gradient(
            135deg,
            #f5f7fa 0%,
            #e9edf2 100%
        );

    margin: 0;
    padding: 30px;

    color: #222;
}

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


/* =========================================
   HEADER
========================================= */

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

.header h1 {
    margin: 0;
    font-size: 36px;
    color: #222;
}

.header p {
    margin-top: 8px;
    color: #666;
    font-size: 17px;
}


/* =========================================
   CONTROLS
========================================= */

.controls {
    display: grid;

    grid-template-columns:
        1fr
        220px
        260px;

    gap: 12px;

    margin-bottom: 20px;
}


/* =========================================
   SEARCH + CREATE KITS
========================================= */

.searchControls {
    display: flex;

    gap: 10px;

    width: 100%;
}

.searchControls input {
    flex: 1;

    min-width: 0;
}

.createKitsButton {
    display: flex;

    align-items: center;
    justify-content: center;

    padding: 13px 20px;

    background: #FFFFFF;

    color: black;

    text-decoration: none;

    font-size: 16px;
    font-weight: bold;

    border-radius: 7px;

    white-space: nowrap;

    box-sizing: border-box;

    transition:
        transform .15s ease,
        filter .15s ease;
}

.createKitsButton:hover {

    transform:
        translateY(-1px);

    filter:
        brightness(1.1);
}


/* =========================================
   INPUTS / SELECTS
========================================= */

input,
select {
    padding: 13px;

    font-size: 16px;

    border: 1px solid #ccc;

    border-radius: 7px;

    background: white;

    box-sizing: border-box;

    width: 100%;
}

input:focus,
select:focus {

    outline: none;

    border-color: #0078d4;

    box-shadow:
        0 0 0 2px
        rgba(0,120,212,.15);
}


/* =========================================
   STATS
========================================= */

.stats {

    margin-bottom: 15px;

    font-weight: bold;

    color: #555;

    font-size: 15px;
}


/* =========================================
   VOCABULARY CARD
========================================= */

.card {

    position: relative;

    background: white;

    border-radius: 12px;

    padding: 20px;

    margin-bottom: 15px;

    box-shadow:
        0 2px 7px rgba(0,0,0,.10);

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    cursor: pointer;

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.card:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 6px 16px
        rgba(0,0,0,.15);
}

.cardInfo {

    flex: 1;

    min-width: 0;
}

.title {

    font-size: 20px;

    font-weight: bold;

    color: #222;

    margin-bottom: 6px;
}

.language {

    color: #0078d4;

    font-weight: bold;

    margin-bottom: 5px;
}

.meta {

    color: #666;

    font-size: 14px;
}


/* =========================================
   NEW BADGE
========================================= */

.newBadge {

    display: inline-block;

    margin-left: 8px;

    padding: 3px 7px;

    background: #e63946;

    color: white;

    font-size: 11px;

    font-weight: bold;

    border-radius: 10px;

    vertical-align: middle;

    text-transform: uppercase;

    letter-spacing: .5px;
}


/* =========================================
   GAME BUTTONS ON CARDS
========================================= */

.gameButtons {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 8px;

    flex-shrink: 0;

    width: 250px;
}

.playButton {

    color: white;

    text-decoration: none;

    padding: 10px 8px;

    border-radius: 6px;

    font-weight: bold;

    font-size: 13px;

    text-align: center;

    transition:
        transform .15s ease,
        filter .15s ease;
}

.playButton:hover {

    transform:
        translateY(-1px);

    filter:
        brightness(1.1);
}


/* =========================================
   INDIVIDUAL GAME COLORS
========================================= */

.gemButton {

    background: #0D5C91;
}

.bubbleButton {

    background: #198754;
}

.choiceButton {
    background: #D97706;
}

.matchButton {

    background: #5925A3;
}

.flashButton {

    background: #B80C59;
}

.quizButton {

    background: #2A3439;
}

/* =========================================
   LOADING / ERROR
========================================= */

.loading {

    text-align: center;

    color: #666;

    padding: 30px;
}

.noResults {

    background: white;

    padding: 30px;

    border-radius: 10px;

    text-align: center;

    color: #666;

    box-shadow:
        0 2px 7px
        rgba(0,0,0,.08);
}

.errorBox {

    background: #fff0f0;

    border: 1px solid #e0a0a0;

    color: #8a1c1c;

    padding: 20px;

    border-radius: 10px;

    line-height: 1.5;
}


/* =========================================
   GAME CHOICE MODAL
========================================= */

.modalOverlay {

    position: fixed;

    inset: 0;

    background:
        rgba(0,0,0,.65);

    display: none;

    align-items: center;

    justify-content: center;

    z-index: 5000;

    padding: 20px;
}

.modalOverlay.show {

    display: flex;
}

.gameModal {

    background: white;

    width: 100%;

    max-width: 550px;

    border-radius: 16px;

    padding: 30px;

    text-align: center;

    box-shadow:
        0 20px 50px
        rgba(0,0,0,.3);
}

.gameModal h2 {

    margin-top: 0;

    margin-bottom: 8px;
}

.gameModal p {

    color: #666;

    margin-bottom: 25px;
}


/* =========================================
   MODAL GAME BUTTONS
========================================= */

.modalGames {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 15px;
}

.modalGameButton {

    border: none;

    border-radius: 10px;

    padding: 20px 10px;

    color: white;

    font-size: 18px;

    font-weight: bold;

    cursor: pointer;

    transition:
        transform .15s ease,
        filter .15s ease;
}

.modalGameButton:hover {

    transform:
        translateY(-2px);

    filter:
        brightness(1.1);
}


/* =========================================
   MODAL GAME COLORS
========================================= */

.modalGem {

    background: #1478BC;
}

.modalBubble {

    background: #1A9A5F;
}

.modalChoice {
    background: #D97706;
}

.modalMatch {

    background: #7437D1;
}

.modalFlash {

    background: #E01A74;
}

.modalQuiz {
    background: #F59E0B;
}

/* =========================================
   CLOSE MODAL
========================================= */

.closeModal {

    margin-top: 20px;

    background: #ddd;

    border: none;

    border-radius: 7px;

    padding: 10px 20px;

    cursor: pointer;

    font-size: 15px;
}

.closeModal:hover {

    background: #ccc;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 800px) {

    body {
        padding: 15px;
    }

    .controls {

        grid-template-columns: 1fr;
    }

    .searchControls {

        width: 100%;
    }

    .card {

        flex-direction: column;

        align-items: stretch;
    }

    .gameButtons {

        width: 100%;
    }

    .playButton {

        flex: 1;
    }

    .modalGames {

        grid-template-columns: 1fr;
    }

}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 500px) {

    .searchControls {

        flex-direction: column;
    }

    .createKitsButton {

        width: 100%;

        min-height: 45px;
    }

}
