/*
 * Free Game Deals Bot
 * Copyright (C) 2026 Daith_42 & Kiliotsu
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
@import url("variables.css");

* {
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: "Saira", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;

    margin: 0;
    padding-top: 100px;
    overflow-x: hidden;
}

#ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg);

    background-image:
            radial-gradient(circle at 0% 0%, rgba(236, 72, 153, 0.15), transparent 40%),
            radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.12), transparent 40%),
            radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.20), transparent 65%),
            radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.20), transparent 65%);

    pointer-events: none;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

nav {
    position: fixed; top: 0; left: 0; right: 0; height: 80px;
    background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%; z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 700;
    font-size: 1.5em;
    color: var(--text);
    text-decoration: none;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 15px;
}

.custom-dropdown {
    position: relative;
    width: 140px;
    font-family: "Saira", sans-serif;
    z-index: 2000;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text);
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-selected:hover, .custom-dropdown.active .dropdown-selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.dropdown-selected svg {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.custom-dropdown.active .chevron {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.custom-dropdown.active .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-options li {
    padding: 8px 15px;
    font-size: 0.85em;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.dropdown-options li:hover, .dropdown-options li.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text);
    border-left: 3px solid var(--primary);
}

.btn {
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-glow {
    background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--glow) border-box;
    border: 2px solid transparent;
    color: var(--text);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
    position: relative;
    z-index: 1;
}

.btn-glow:hover {
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
}

header {
    text-align: center;
    padding: 40px 20px 60px;
}

h1 {
    font-size: 3.5em;
    margin: 0 0 10px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2em;
    margin-bottom: 40px;
    font-weight: 300;
}

.setup-box {
    background: var(--card-bg);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin: 0 auto 60px;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.setup-box h2 {
    margin-top: 0;
    font-size: 1.4em;
    margin-bottom: 25px;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.step {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-icon {
    width: 48px; height: 48px; min-width: 48px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.step-text h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.step-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.4;
}

.section-title {
    font-size: 1.8em;
    margin: 0 0 25px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.img-wrapper {
    position: relative;
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    opacity: 0.9;
}

.badge {
    position: absolute; top: 12px; right: 12px; padding: 6px 12px;
    border-radius: 8px; font-size: 0.75em; font-weight: 600;
    background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(4px);
    border: 1px solid var(--border); display: flex; align-items: center; gap: 6px;
}

.info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.info h3 {
    margin: 0 0 10px;
    font-size: 1.3em;
    letter-spacing: 0.5px;
}

.date {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-bottom: auto;
}

.end-date {
    color: var(--accent);
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 5px;
}

.btn-card {
    margin-top: 20px; display: block; text-align: center;
    background: rgba(255, 255, 255, 0.05); color: var(--text);
    border: 1px solid var(--border); padding: 12px; border-radius: 10px;
}

.btn-card:hover {
    background: var(--text);
    color: var(--bg);
}

footer {
    margin-top: 100px;
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.credits-link {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.credits-link:hover {
    color: var(--text);
    text-shadow: 0 0 10px var(--primary);
}
.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.85em;
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-links a:hover {
    color: var(--text);
    text-shadow: 0 0 8px var(--primary);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 50px auto;
    padding: 40px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.accordion-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.3s ease;
}

.accordion-item.active {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary);
}

.accordion-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.accordion-header .chevron {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.accordion-item.active .accordion-header .chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content p {
    margin: 0;
    padding: 0 20px 15px 20px;
    color: var(--text-muted);
    font-size: 0.95em;
    line-height: 1.5;
}

.footer-links a[href*="ko-fi"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.footer-links a[href*="ko-fi"] svg {
    width: 18px;
    height: 10px;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .custom-dropdown { width: 120px; }
    .dropdown-selected { padding: 6px 12px; }

    h1 {
        font-size: 2.5em;
    }

    .steps {
        flex-direction: column;
    }

    nav {
        padding: 0 15px;
    }

    .logo {
        font-size: 0;
    }

    .logo::after {
        content: "FGD";
        font-size: 24px;
        font-weight: 700;
    }

    .nav-items .btn-glow {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 20px auto;
    }
    #modalBody {
        font-size: 0.9em;
    }
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text);
}

.btn-icon {
    margin-right: 8px;
    width: 18px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 1px solid var(--border);
    padding-left: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-name {
    font-weight: 600;
    color: var(--text);
}

.btn-logout {
    color: #ff5f5f;
    text-decoration: none;
    font-size: 0.9em;
    margin-left: 10px;
    font-weight: bold;
    border: 1px solid rgba(255, 95, 95, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-logout:hover {
    background: #ff5f5f;
    color: var(--bg);
}

.container-centered {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-box {
    background: rgba(20, 20, 30, 0.6);
    border-color: rgba(59, 130, 246, 0.3);
}

.footer-bottom {
    margin-top: auto;
    padding-top: 40px;
}

.faq-box {
    margin-top: 80px;
    text-align: left;
    padding: 40px;
}