/* =====================================================
   FITTSY / MySEOpanel — DARK BLUE GLASS THEME (v13 FINAL)
   ===================================================== */
:root {
    --bg: #0b1220;
    --bg-card: rgba(15, 23, 42, .9);
    --border: rgba(255, 255, 255, .08);
    --text: #e5eaff;
    --muted: #9db1ff;
    --accent: #4b63ff;
    --accent-light: #6c82ff;
    --accent-glow: rgba(75, 99, 255, .35);
    --radius: 14px;
    --shadow: 0 8px 32px rgba(0, 0, 0, .45);
    --blur: blur(20px);
    --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html,
body {
    height: 100%
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 20%, #0c1530, #060b17) fixed;
    background-attachment: fixed;
    background-size: cover;
    color: var(--text);
    font-family: var(--font)
}

/* NAV */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 26px;
    /* większy padding, stały */
    height: 64px;
    /* stała wysokość */
    background: rgba(15, 22, 45, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav .brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--accent-light);
}

.brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: .4px;
    text-decoration: none;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoGlow 6s ease-in-out infinite alternate
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 4px var(--accent-glow))
    }

    100% {
        filter: drop-shadow(0 0 14px rgba(108, 130, 255, .5))
    }
}

.menu-left,
.menu-right {
    display: flex;
    align-items: center;
    gap: 16px
}

.menu-left {
    margin-left: 28px;
    flex-wrap: wrap
}

.menu-right {
    margin-left: auto
}

.nav a {
    color: #d7deff;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.25s, color 0.25s;
}

.nav a:hover {
    color: var(--accent-light);
    text-shadow: 0 0 8px var(--accent-glow)
}

/* Banner SEO Guide - pod menu */
.seo-guide-banner {
    position: relative;
    z-index: 99;
    margin-top: -8px;
    padding: 0 26px;
    margin-bottom: 20px;
}

.seo-guide-banner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(75, 99, 255, 0.15) 0%, rgba(108, 130, 255, 0.15) 100%);
    border: 1px solid rgba(75, 99, 255, 0.3);
    border-radius: 12px;
    padding: 14px 24px;
    color: var(--accent-light) !important;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(75, 99, 255, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.seo-guide-banner-link:hover {
    background: linear-gradient(135deg, rgba(75, 99, 255, 0.25) 0%, rgba(108, 130, 255, 0.25) 100%);
    box-shadow: 0 6px 20px rgba(75, 99, 255, 0.25);
    transform: translateY(-2px);
    text-shadow: 0 0 8px var(--accent-glow);
    border-color: rgba(75, 99, 255, 0.5);
}

.seo-guide-banner-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 4px var(--accent-glow));
}

.seo-guide-banner-text {
    flex: 1;
    text-align: center;
}

.seo-guide-banner-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--accent-light);
}

.seo-guide-banner-link:hover .seo-guide-banner-arrow {
    transform: translateX(4px);
}

.nav .btn-nav {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    color: #fff !important;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    transition: box-shadow 0.25s, transform 0.2s;
}

.nav .btn-nav:hover {
    box-shadow: 0 0 12px var(--accent-glow);
    transform: translateY(-1px);
}

/* Dropdown w menu */
.dropdown {
    position: relative;
}

.dropdown .dropbtn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    font: inherit;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: rgba(20, 30, 60, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    min-width: 280px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    display: none;
}

.dropdown.open .dropdown-menu {
    display: block;
}

/* Buttons in right menu */
.menu-right a {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 8px 16px;
    border-radius: 8px
}

.menu-right a:hover {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 0 10px var(--accent-glow)
}

/* DROPDOWN */
.dropdown {
    position: relative
}

.dropbtn {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    color: var(--text);
    border-radius: var(--radius);
    padding: 9px 14px;
    cursor: pointer;
    transition: .25s;
    font-weight: 500
}

.dropbtn:hover {
    background: rgba(255, 255, 255, .1);
    color: var(--accent-light)
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    display: none;
    overflow: hidden;
    z-index: 999
}

.dropdown.open .dropdown-menu {
    display: block;
    animation: fadeIn .2s ease-out
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--text);
    font-size: .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .05)
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--accent-light)
}

.dropdown-menu a:last-child {
    border-bottom: 0
}

/* GLOBAL LINKS */
a {
    color: var(--accent-light);
    text-decoration: none;
    transition: .25s
}

a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--accent-glow)
}

/* LAYOUT */
.container,
main {
    flex: 1;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 24px 100px
}

/* CARDS */
.card,
.auth-card,
.home-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    padding: 28px;
    margin-bottom: 24px;
    animation: fadeIn .5s ease-out
}

.card h2,
.auth-card h2,
.home-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent-light)
}

/* HOME */
.home-card {
    text-align: center;
    max-width: 540px;
    margin: 100px auto
}

.home-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px
}

/* FORMS & BUTTONS (global – obejmuje wszystkie buttony, także „Unieważnij/Usuń”) */
input[type="text"],
input[type="email"],
input[type="password"] {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
    transition: .25s;
    width: 100%
}

input:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 6px var(--accent-glow)
}

button,
.btn,
input[type="button"],
input[type="submit"] {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: .25s;
    display: inline-flex;
    align-items: center;
    gap: 8px
}

button:hover,
.btn:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 14px var(--accent-glow)
}

button.secondary,
.btn.secondary {
    background: rgba(255, 255, 255, .08);
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, .1)
}

button.secondary:hover,
.btn.secondary:hover {
    background: rgba(255, 255, 255, .15);
    color: var(--text)
}

/* AUTH PAGES */
.auth-card {
    max-width: 440px;
    margin: 100px auto;
    text-align: center
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.auth-links {
    margin-top: 16px;
    color: var(--muted)
}

.auth-links a {
    color: var(--accent-light)
}

.auth-links a:hover {
    text-decoration: underline
}

.auth-error {
    background: rgba(255, 64, 64, .15);
    border: 1px solid rgba(255, 100, 100, .3);
    color: #ff9b9b;
    text-align: center;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: .9rem
}

/* DASHBOARD TABLES */
.card table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px
}

.card th {
    color: var(--muted);
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .6px;
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.card td {
    padding: 10px 8px;
    font-size: .95rem;
    color: var(--text);
    background: rgba(255, 255, 255, .02);
    border-radius: 6px
}

.card tr:hover td {
    background: rgba(255, 255, 255, .06);
    transition: .2s
}

.card tr td:first-child {
    border-left: 3px solid transparent
}

.card tr:hover td:first-child {
    border-left: 3px solid var(--accent-light)
}

/* API FORM (estetyka + odstęp) */
.api-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px
}

.api-form input {
    flex: 1;
    max-width: 260px
}

/* FOOTER */
footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: rgba(10, 17, 32, .95);
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: var(--muted);
    font-size: .9rem;
    text-align: center;
    padding: 14px 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .4);
    z-index: 50
}

/* UTILS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.api-form {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin: 20px 0 24px;
}

.api-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 0.95rem;
    transition: 0.25s;
}

.api-form input:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 8px var(--accent-glow);
}

.api-form button {
    min-width: 200px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0 18px;
    font-size: 0.95rem;
    transition: 0.25s;
}

.api-form button:hover {
    box-shadow: 0 0 12px var(--accent-glow);
    transform: translateY(-1px);
}

/* Komunikat po wygenerowaniu tokena */
.api-token-box {
    background: rgba(30, 40, 70, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.2);
}

.api-token-box strong {
    display: block;
    font-family: monospace;
    font-size: 1.05rem;
    color: #9ec0ff;
    margin-top: 6px;
    word-break: break-all;
}

.api-token-box p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 4px;
}