/* Alap beállítások */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #202020;
    color: #f5f5f5;
    line-height: 1.5;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ===== HEADER – gyűrűs brand blokk ===== */

.site-header {
    background: #202020;
    border-bottom: 1px solid #3a3a3a;
    position: sticky;
    top: 0;
    z-index: 1000; /* hogy minden fölött legyen */
}

.header-bg {
    background:
        radial-gradient(circle at top left, rgba(249, 156, 27, 0.25), transparent 55%),
        radial-gradient(circle at top right, rgba(103, 153, 209, 0.35), transparent 60%),
        #202020;
    padding: 0.3rem 0;                 /* kisebb belső margó */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 100px;                 /* itt jön ki a kb. 100px összmagasság */
}

/* Bal oldali brand blokk */

.brand-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.brand-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgb(249, 156, 27);
    box-shadow:
        0 0 10px rgba(249, 156, 27, 0.7),
        0 0 26px rgba(0, 0, 0, 0.9);
    display: inline-block;
}

.brand-title {
    font-size: 1.25rem;                /* 1.5 → 1.25 */
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f5f5f5;
    text-shadow:
        0 0 6px rgba(0, 0, 0, 0.8),
        0 0 18px rgba(103, 153, 209, 0.6);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-tagline {
    font-size: 0.85rem;
    color: #d1d5db;
    margin-top: 0.15rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* NAV */

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: #f5f5f5;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover {
    background: rgba(249, 156, 27, 0.15);
    border-color: rgba(249, 156, 27, 0.6);
    color: #fbbf77;
}

.user-info {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    color: #cccccc;
}

/* Mobil fejléchez */

@media (max-width: 720px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        min-height: 90px;             /* kicsit kisebb lehet */
    }

    .main-nav {
        justify-content: flex-start;
    }

    .brand-title {
        font-size: 1.1rem;
    }
}

/* ===== HERO – nagy fejléc kép ===== */

.hero {
    border-bottom: 1px solid #3a3a3a;
    background: #111;
}

.hero-bg {
    position: relative;
    background-image: url('/assets/img/hero-meme.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0.75)),
        radial-gradient(circle at top right, rgba(103,153,209,0.35), transparent 55%),
        radial-gradient(circle at bottom left, rgba(249,156,27,0.25), transparent 55%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    padding: 2.5rem 1.5rem 2.7rem;
    display: flex;
    align-items: center;
    min-height: 220px;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 2.2rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f5f5f5;
    text-shadow:
        0 0 8px rgba(0,0,0,0.9),
        0 0 18px rgba(0,0,0,0.9);
    margin-bottom: 0.6rem;
}

.hero-text p {
    font-size: 1rem;
    color: #e5e7eb;
    max-width: 40rem;
}

.hero-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Gombok – általános + hero */

button,
input[type="submit"],
.btn-primary,
.btn-ghost {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

button,
input[type="submit"],
.btn-primary {
    background: #f99c1b;
    color: #202020;
    border: 1px solid #f99c1b;
}

button:hover:not(:disabled),
input[type="submit"]:hover:not(:disabled),
.btn-primary:hover {
    background: rgb(255, 181, 80);
    border-color: rgb(255, 181, 80);
}

button:disabled,
input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: #f5f5f5;
    border: 1px solid rgba(229, 231, 235, 0.7);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.7);
}

/* Hero mobilon */

@media (max-width: 720px) {
    .hero-inner {
        padding: 1.8rem 1.2rem 2rem;
        min-height: 180px;
    }

    .hero-text h1 {
        font-size: 1.6rem;
    }

    .hero-text p {
        font-size: 0.9rem;
    }
}

/* ===== Page title ===== */

.page-title {
    margin: 1.5rem 0;
    font-size: 1.6rem;
}

/* ===== Info / hiba dobozok ===== */

.error,
.info {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid #ef4444;
    color: #fecaca;
}

.info {
    background: rgba(103, 153, 209, 0.18);
    border: 1px solid #6799D1;
    color: #d4e3f7;
}

/* ===== Footer ===== */

.site-footer {
    border-top: 1px solid #3a3a3a;
    padding: 1rem 0;
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #b0b0b0;
    color: #0097c2;
    text-align: center;
}

/* ===== Formok (login, register, upload) ===== */

.form-card {
    max-width: 480px;
    margin: 1.5rem auto 2rem;
    background: #262626;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #3a3a3a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.form-card h1 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.form-card p.form-lead {
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 1rem;
}

form {
    margin-top: 1rem;
    max-width: 400px;
}

label {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.6rem;
    color: #f5f5f5;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.2rem;
    border-radius: 0.4rem;
    border: 1px solid #3a3a3a;
    background: #181818;
    color: #f5f5f5;
    font-size: 0.9rem;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

input[type="file"] {
    margin-top: 0.3rem;
    font-size: 0.85rem;
}

/* Linkek a form környékén */

.form-card a {
    color: #fbbf24;
    text-decoration: none;
}

.form-card a:hover {
    text-decoration: underline;
}

#username-status {
    min-height: 18px;
}

.file-help {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #d1d5db;
    line-height: 1.4;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
    font-size: 0.85rem;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
}

/* ===== Mém lista a főoldalon – egyoszlopos, középre igazítva ===== */

.meme-grid {
    display: flex;
    flex-direction: column;      /* egymás alatt */
    gap: 1.5rem;
    align-items: center;         /* középre húzza a kártyákat */
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.meme-card {
    background: #262626;
    border-radius: 0.75rem;
    border: 1px solid #3a3a3a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    width: 100%;
    max-width: 700px;            /* fix szélesség plafon */
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
}

/* Képtartó doboz – teljes szélesség, változó magasság, aránytartó kép */
.meme-image-wrap {
    width: 100%;
    background: #181818;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* A kép aránytartó, a szélességhez igazodik, magasság rugalmas */
.meme-image-wrap img {
    display: block;
    width: 100%;      /* kártya szélességéhez igazodik */
    height: auto;     /* magasság a képarány szerint */
    object-fit: contain;
}

.meme-content {
    padding-top: 0.8rem;
}

.meme-title {
    font-size: 2.0rem;
    margin-bottom: 0.4rem;
    color: #ffffff;
}

.meme-desc {
    font-size: 0.9rem;
    color: #dddddd;
    margin-bottom: 0.75rem;
}

.meme-meta {
    display: flex;
    justify-content: space-between;
    font-size: 1.0rem;
    color: #b0b0b0;
    margin-bottom: 0.5rem;
}

.vote-btn {
    margin-top: 0.4rem;
}

/* Rendezési sáv a főoldalon */

.sort-bar {
    margin: 0.5rem 0 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-bar span {
    color: #d1d5db;
}

.sort-link {
    color: #9ca3af;
    text-decoration: none;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.85rem;
}

.sort-link:hover {
    color: #fbbf24;
    border-color: rgba(249, 156, 27, 0.5);
    background: rgba(15, 23, 42, 0.6);
}

.sort-link.active {
    color: #111827;
    background: #fbbf24;
    border-color: #fbbf24;
    font-weight: 600;
}

/* ===== Vissza a tetejére gomb ===== */

.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #fbbf24;
    background: rgba(15, 23, 42, 0.9);
    color: #fbbf24;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
    z-index: 1500;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(30, 64, 175, 0.95);
    color: #fff;
}

.vote-btn.voted {
    background: #16a34a;
    border-color: #16a34a;
    color: #f9fafb;
}
