/* ========================================================
   RESET & BASE
   ======================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0c16;
    color: #e8edf5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    width: 100%;
}

/* ========================================================
   HEADER (logo wyśrodkowane)
   ======================================================== */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0 16px;
    border-bottom: 1px solid #2a1a2a;
    margin-bottom: 24px;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}
.logo-link:active {
    transform: scale(0.96);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ff4d4d, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    cursor: pointer;
}
.logo i {
    -webkit-text-fill-color: initial;
    color: #ff4d4d;
    margin-right: 8px;
}

/* ========================================================
   HERO
   ======================================================== */
.hero {
    text-align: center;
    padding: 16px 0 28px;
}
.hero h1 {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
}
.hero h1 span {
    background: linear-gradient(to right, #ff4d4d, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1rem;
    color: #9aaac9;
    max-width: 600px;
    margin: 0 auto 20px;
    padding: 0 4px;
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
}
.badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1a1a2e;
    padding: 6px 14px;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #2a1a2a;
    white-space: nowrap;
}
.badge i {
    color: #ff4d4d;
    font-size: 0.9rem;
}

/* ========================================================
   WYSZUKIWARKA
   ======================================================== */
.search-section {
    margin: 16px 0 28px;
}
.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: #0c111e;
    border-radius: 60px;
    border: 1px solid #2a1a2a;
    overflow: hidden;
    transition: 0.2s;
}
.search-box:focus-within {
    border-color: #ff4d4d;
    box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.12);
}
.search-box input {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: #e8edf5;
    font-size: 0.95rem;
    outline: none;
    min-width: 0;
}
.search-box input::placeholder {
    color: #6a7a9a;
}
.search-box .search-icon {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #6a7a9a;
    font-size: 1rem;
}

/* ========================================================
   LISTA GIER – UKŁAD POZIOMY
   ======================================================== */
.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.games-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
}
.games-header h2 i {
    color: #ff4d4d;
    margin-right: 8px;
}
#gameCounter {
    font-size: 0.75rem;
    color: #6f8fcf;
    background: #1a1a2e;
    padding: 3px 12px;
    border-radius: 40px;
    border: 1px solid #2a1a2a;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 20px 0 16px;
}

/* ===== KARTA GRY (pozioma) ===== */
.game-card {
    background: #111622;
    border: 1px solid #2a1a2a;
    border-radius: 18px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.25s ease;
    text-decoration: none;
    color: #e8edf5;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    min-height: 90px;
}

.game-card:hover {
    border-color: #ff4d4d;
    transform: translateX(6px);
    box-shadow: 0 4px 25px rgba(255, 77, 77, 0.08);
}

.game-card:active {
    transform: scale(0.98);
}

/* ===== IKONA – KWADRATOWA Z ZAOKRĄGLONYMI ROGAMI ===== */
.game-card .game-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px; /* <-- ZMIENIONE z 50% na 16px */
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #2a1a2a;
    overflow: hidden;
    transition: 0.2s;
}

.game-card:hover .game-icon {
    border-color: #ff4d4d;
    transform: scale(1.04);
}

.game-card .game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px; /* <-- ZMIENIONE z 50% na 16px */
    display: block;
}

.game-card .game-icon .emoji-fallback {
    font-size: 2rem;
}

/* ===== INFORMACJE (środek) ===== */
.game-card .game-info {
    flex: 1;
    min-width: 0;
}

.game-card .name {
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 4px;
    line-height: 1.2;
    color: #e8edf5;
}

.game-card .desc {
    font-size: 0.85rem;
    color: #9aaac9;
    margin-bottom: 4px;
    font-weight: 500;
}

.game-card .rating {
    font-size: 0.95rem;
    letter-spacing: 2px;
    color: #fbbf24;
}

.game-card .rating .far.fa-star {
    color: #4a4a5a;
}

/* ===== STRZAŁKA (prawa) ===== */
.game-card .game-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    color: #4a4a5a;
    font-size: 1.4rem;
    transition: 0.25s ease;
}

.game-card:hover .game-arrow {
    color: #ff4d4d;
    transform: translateX(4px);
}

/* ========================================================
   PRZYCISK "POKAŻ WIĘCEJ"
   ======================================================== */
.load-more-wrapper {
    text-align: center;
    margin: 8px 0 24px;
}
.load-more-btn {
    background: #1a1a2e;
    border: 1.5px solid #2a1a2a;
    color: #c8d2f0;
    padding: 12px 32px;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
}
.load-more-btn:active {
    transform: scale(0.96);
}
.load-more-btn i {
    font-size: 0.8rem;
}

/* ========================================================
   JAK TO DZIAŁA
   ======================================================== */
.steps-section {
    margin: 32px 0 20px;
    text-align: center;
}
.steps-section h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
}
.steps-section .sub {
    color: #9aaac9;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.step-item {
    background: #111622;
    border-radius: 14px;
    padding: 16px 10px;
    border: 1px solid #2a1a2a;
}
.step-item .num {
    display: inline-block;
    background: linear-gradient(135deg, #ff4d4d, #ff6b35);
    color: #0a0c16;
    font-weight: 900;
    width: 34px;
    height: 34px;
    line-height: 34px;
    border-radius: 50%;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.step-item h4 {
    font-size: 0.85rem;
    margin-bottom: 2px;
}
.step-item p {
    font-size: 0.7rem;
    color: #9aaac9;
}

/* ========================================================
   SEKCJA ABOUT
   ======================================================== */
.about-section {
    background: #111622;
    border-radius: 18px;
    padding: 28px 18px;
    margin: 24px 0 16px;
    border: 1px solid #2a1a2a;
    text-align: center;
}
.about-container {
    max-width: 700px;
    margin: 0 auto;
}
.about-section h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.about-section h2 span {
    background: linear-gradient(to right, #ff4d4d, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.about-section p {
    font-size: 0.9rem;
    color: #b0c4e0;
    line-height: 1.6;
    margin-bottom: 16px;
}
.about-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    margin: 12px 0 18px;
}
.about-stats div {
    font-weight: 600;
    color: #9aaac9;
    font-size: 0.8rem;
}
.about-stats div span {
    display: block;
    font-size: 1.6rem;
    font-weight: 900;
    color: #ff4d4d;
    line-height: 1.1;
}
.btn-about {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 60px;
    background: linear-gradient(135deg, #ff4d4d, #ff6b35);
    color: #0a0c16;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.btn-about:active {
    transform: scale(0.96);
}
.btn-about i {
    margin-left: 6px;
}

/* ========================================================
   STOPKA
   ======================================================== */
.footer {
    margin-top: 28px;
    padding: 18px 0 12px;
    border-top: 1px solid #2a1a2a;
    text-align: center;
    color: #6f7da3;
    font-size: 0.75rem;
}
.footer a {
    color: #8a7a9b;
    text-decoration: none;
    margin: 0 8px;
}
.footer a:active {
    color: #ff4d4d;
}
.footer p {
    margin-bottom: 4px;
}

/* ========================================================
   NO RESULTS
   ======================================================== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    color: #6f8fcf;
}
.no-results i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    color: #4a3a4a;
}
.no-results p {
    font-size: 0.9rem;
}

/* ========================================================
   RESPONSYWNOŚĆ
   ======================================================== */

/* --- Tablety i małe ekrany (poniżej 992px) --- */
@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* --- Telefony (poniżej 640px) --- */
@media (max-width: 640px) {
    body {
        padding: 10px 8px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 0.9rem;
        padding: 0 2px;
    }
    .badge {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
    .badge i {
        font-size: 0.75rem;
    }

    .search-box input {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    .search-box .search-icon {
        padding: 0 10px;
    }

    .games-header h2 {
        font-size: 1rem;
    }
    #gameCounter {
        font-size: 0.65rem;
        padding: 2px 10px;
    }

    .game-card {
        padding: 14px 16px;
        gap: 14px;
        min-height: 74px;
    }

    /* KWADRATOWE IKONY NA TELEFONIE – MNEJSZE */
    .game-card .game-icon {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }
    .game-card .game-icon img {
        border-radius: 12px;
    }
    .game-card .game-icon .emoji-fallback {
        font-size: 1.6rem;
    }

    .game-card .name {
        font-size: 1rem;
    }
    .game-card .desc {
        font-size: 0.7rem;
    }
    .game-card .rating {
        font-size: 0.8rem;
    }
    .game-card .game-arrow {
        font-size: 1.1rem;
    }

    .load-more-btn {
        padding: 10px 24px;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }

    .steps-section h2 {
        font-size: 1.4rem;
    }
    .steps-section .sub {
        font-size: 0.85rem;
    }
    .steps-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .step-item {
        padding: 12px 8px;
    }
    .step-item .num {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 0.75rem;
    }
    .step-item h4 {
        font-size: 0.75rem;
    }
    .step-item p {
        font-size: 0.6rem;
    }

    .about-section {
        padding: 20px 14px;
        margin: 16px 0 12px;
    }
    .about-section h2 {
        font-size: 1.3rem;
    }
    .about-section p {
        font-size: 0.8rem;
    }
    .about-stats div {
        font-size: 0.7rem;
    }
    .about-stats div span {
        font-size: 1.3rem;
    }
    .btn-about {
        padding: 10px 20px;
        font-size: 0.8rem;
        width: 100%;
    }

    .footer {
        font-size: 0.65rem;
        padding: 14px 0 8px;
    }
    .footer a {
        margin: 0 6px;
    }
}

/* --- Bardzo małe telefony (poniżej 400px) --- */
@media (max-width: 400px) {
    .game-card {
        padding: 10px 12px;
        gap: 10px;
        min-height: 64px;
    }

    .game-card .game-icon {
        width: 46px;
        height: 46px;
        border-radius: 10px;
    }
    .game-card .game-icon img {
        border-radius: 10px;
    }
    .game-card .game-icon .emoji-fallback {
        font-size: 1.3rem;
    }

    .game-card .name {
        font-size: 0.85rem;
    }
    .game-card .desc {
        font-size: 0.6rem;
    }
    .game-card .rating {
        font-size: 0.65rem;
    }
    .game-card .game-arrow {
        font-size: 0.9rem;
    }

    .steps-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .step-item {
        padding: 10px 6px;
    }
    .step-item .num {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 0.65rem;
    }
}