@import url('./variables.css');

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: clip;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img { max-width: 100%; display: block; }

button { font-family: var(--font); }

.bg-glow-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--glow-1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -2;
}

.bg-glow-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--glow-2) 0%, transparent 70%);
    pointer-events: none;
    z-index: -2;
}

.radial-glow-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--glow-1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -2;
}

.radial-glow-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--glow-2) 0%, transparent 70%);
    pointer-events: none;
    z-index: -2;
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, background 0.3s ease;
}

.glass-panel:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.navbar {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 500;
    background: var(--navbar-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}

.navbar-container,
.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--nav-h);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo {
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, var(--text) 0%, var(--accent) 50%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: clamp(0.75rem, 2vw, 2rem);
    list-style: none;
    align-items: center;
    margin: 0 auto;
}

.nav-item a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-item a:hover,
.nav-item.active a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-admin-btn,
.nav-btn {
    background: linear-gradient(135deg, var(--accent), hsl(280, 85%, 50%));
    color: hsl(0, 0%, 98%) !important;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 700;
    border-bottom: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.nav-admin-btn:hover,
.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

/* ── D Badge (admin CMS link) ── */
.nav-d-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
    flex-shrink: 0;
}
.nav-d-badge:hover {
    transform: scale(1.12);
    filter: drop-shadow(0 0 8px hsla(270,85%,65%,0.6));
}
.nav-d-badge svg { display: block; }

/* ── Profile avatar circle in navbar ── */
.nav-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-bg);
    border: 1.5px solid var(--border-accent);
    text-decoration: none;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.nav-avatar:hover {
    border-color: var(--accent);
    transform: scale(1.08);
}
.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.nav-avatar-initial {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ── Profile page avatar ── */
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.profile-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-accent);
    display: block;
}
.profile-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-bg);
    border: 2px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}
.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s;
}
.profile-avatar-edit:hover { background: hsl(270,85%,50%); }

.theme-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.55rem;
    cursor: pointer;
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.theme-btn:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: var(--shadow-glow);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 600;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 450;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.main-content {
    min-height: calc(100vh - var(--nav-h) - 80px);
}

.footer {
    border-top: 1px solid var(--border);
    padding: 1.75rem 0;
    background: var(--footer-bg);
    backdrop-filter: blur(8px);
    transition: background 0.3s ease;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-3);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
}

.footer-link {
    color: var(--text-2);
    transition: color 0.2s ease;
}

.footer-link:hover { color: var(--text); }
.footer-link.accent { color: var(--accent); font-weight: 600; }
.footer-link.accent:hover { color: var(--accent-2); }

.hero {
    position: relative;
    width: 100%;
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.hero-grid-wrapper,
.hero-background-grid {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-grid-scroller,
.hero-background-scroller {
    display: flex;
    height: 100%;
    width: max-content;
    animation: scroll-rtl 40s linear infinite;
}

.hero-grid-item,
.hero-grid-image-wrapper {
    height: 100%;
    width: clamp(240px, 28vw, 380px);
    flex-shrink: 0;
    padding: 0.5rem;
}

.hero-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    opacity: 0.22;
}

@keyframes scroll-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 820px;
    text-align: center;
}

.hero-badge-row {
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: 1px solid var(--border-accent);
    background: var(--accent-bg);
    color: var(--accent);
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.hero-title .line {
    display: block;
    background: linear-gradient(135deg, var(--text) 30%, var(--text-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title .line-accent {
    display: block;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title span {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.4vw, 1.2rem);
    color: var(--text-2);
    margin-bottom: 2.5rem;
    font-weight: 400;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.72rem 1.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    font-family: var(--font);
    text-transform: uppercase;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, hsl(285, 80%, 54%));
    color: hsl(0, 0%, 98%);
    box-shadow: 0 4px 14px hsla(270, 85%, 60%, 0.22);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), 0 6px 18px hsla(270, 85%, 60%, 0.3);
}

.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--text-2);
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--accent-3);
    color: var(--bg);
}

.btn-success:hover:not(:disabled) {
    box-shadow: 0 0 14px hsla(145, 80%, 45%, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--accent-4);
    color: hsl(0, 0%, 98%);
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 0 14px hsla(25, 90%, 55%, 0.4);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
}

.form-group { margin-bottom: 1.2rem; text-align: left; }

.form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 0.45rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.72rem 1rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.form-control::placeholder { color: var(--text-3); }

textarea.form-control { resize: vertical; min-height: 100px; }

.input-wrapper {
    position: relative;
}

.input-wrapper .form-control {
    padding-right: 2.8rem;
}

.show-pass-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-3);
    font-size: 0.9rem;
    padding: 0.2rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.show-pass-btn:hover { color: var(--text-2); }

.field-hint {
    display: block;
    font-size: 0.68rem;
    margin-top: 0.35rem;
    min-height: 1em;
    transition: color 0.2s ease;
    color: var(--text-3);
}

.field-hint.available { color: var(--hint-ok); }
.field-hint.unavailable { color: var(--hint-err); }
.field-hint.checking { color: var(--hint-neutral); }

.strength-meter {
    display: flex;
    gap: 4px;
    margin-top: 0.5rem;
}

.strength-bar {
    height: 3px;
    flex: 1;
    border-radius: 2px;
    background: var(--border);
    transition: background 0.3s ease;
}

.strength-label {
    font-size: 0.68rem;
    margin-top: 0.3rem;
    color: var(--text-3);
    display: block;
    min-height: 1em;
    transition: color 0.2s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.page-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.035em;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-2);
    margin-bottom: 2.5rem;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

.alerts-container {
    position: fixed;
    top: calc(var(--nav-h) + 1rem);
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 370px;
    width: calc(100% - 3rem);
    pointer-events: none;
}

.alert-toast {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
    border-left: 3px solid transparent;
    backdrop-filter: blur(12px);
}

.alert-toast.success {
    background: var(--toast-ok-bg);
    border-left-color: var(--toast-ok-border);
    color: var(--toast-ok-text);
}

.alert-toast.error {
    background: var(--toast-err-bg);
    border-left-color: var(--toast-err-border);
    color: var(--toast-err-text);
}

.alert-toast.info {
    background: var(--toast-info-bg);
    border-left-color: var(--toast-info-border);
    color: var(--toast-info-text);
}

.alert-toast button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.7;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
}

.alert-toast button:hover { opacity: 1; }

@keyframes toast-in {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.blog-card-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.blog-card-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-meta {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-bottom: 0.65rem;
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.blog-card-title a:hover { color: var(--accent); }

.blog-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-2);
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.blog-category-badge {
    font-size: 0.68rem;
    padding: 0.22rem 0.55rem;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-read-more {
    font-size: 0.8rem;
    color: var(--accent-2);
    font-weight: 600;
    transition: color 0.2s ease;
}

.blog-read-more:hover { color: var(--accent); }

.post-header { margin-bottom: 2rem; }

.back-link {
    font-size: 0.82rem;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.back-link:hover { color: var(--text); }

.post-meta {
    font-size: 0.82rem;
    color: var(--text-2);
    display: flex;
    gap: 1.25rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.post-img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.post-content {
    font-size: 0.97rem;
    line-height: 1.85;
    color: var(--text);
}

.post-content p { margin-bottom: 1.4rem; }
.post-content h2, .post-content h3 { margin: 2rem 0 1rem; font-weight: 700; letter-spacing: -0.02em; }

.post-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 2rem 0;
}

.like-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.like-btn:hover { border-color: var(--border-accent); }

.like-btn.liked {
    background: var(--accent-bg);
    border-color: var(--border-accent);
    color: var(--accent);
}

.comments-section { margin-top: 2.5rem; }
.comment-form { margin-bottom: 2rem; }

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.comment-card { padding: 1.1rem 1.25rem; }
.comment-author { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.2rem; }
.comment-date { font-size: 0.7rem; color: var(--text-3); margin-bottom: 0.6rem; }
.comment-text { font-size: 0.875rem; color: var(--text-2); line-height: 1.6; }

.pricing-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    padding: 2.25rem 1.75rem;
}

.pricing-card.featured {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
    position: relative;
}

.pricing-featured-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), hsl(285, 80%, 54%));
    color: hsl(0, 0%, 98%);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.85rem;
    border-radius: 100px;
    text-transform: uppercase;
    white-space: nowrap;
}

.pricing-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.85rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--text);
    line-height: 1;
}

.pricing-interval {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin: 1.25rem 0 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex-grow: 1;
}

.pricing-features li {
    font-size: 0.85rem;
    color: var(--text-2);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.pricing-features li::before {
    content: "✓";
    color: var(--accent-3);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.channel-card {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.channel-header { display: flex; align-items: center; gap: 1rem; }

.channel-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.channel-logo-fallback {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-bg);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.channel-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.15rem; }
.channel-stats { font-size: 0.72rem; color: var(--text-2); }
.channel-desc { font-size: 0.85rem; color: var(--text-2); flex-grow: 1; line-height: 1.6; }

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.75rem;
    gap: 0;
    overflow-x: auto;
}

.tab-link {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-2);
    padding: 0.7rem 1.1rem;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px;
}

.tab-link:hover { color: var(--text); }

.tab-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.account-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.875rem;
}

.account-info-row div span:first-child {
    color: var(--text-2);
    font-weight: 600;
}

.account-role-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid var(--border-accent);
}

.click-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.72rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    gap: 1rem;
}

.click-history-item:last-child { border-bottom: none; }
.click-history-type { color: var(--accent); font-weight: 600; }
.click-history-date { color: var(--text-3); font-size: 0.72rem; }

.admin-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    min-height: 80vh;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-right: 1rem;
    border-right: 1px solid var(--border);
}

.admin-side-link {
    background: transparent;
    border: none;
    color: var(--text-2);
    padding: 0.65rem 0.9rem;
    font-family: var(--font);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    border-radius: var(--radius);
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-side-link:hover,
.admin-side-link.active {
    background: var(--surface-hover);
    color: var(--accent);
}

.admin-table-container { overflow-x: auto; margin: 1.25rem 0; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 700;
    color: var(--text-2);
    background: var(--table-head-bg);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
}

.admin-table tr:hover td { background: var(--table-hover-bg); }

.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.bot-card { padding: 1.4rem; }
.bot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.85rem; }
.bot-name { font-weight: 700; font-size: 1rem; }

.bot-status-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bot-status-badge.running {
    background: var(--running-bg);
    color: var(--accent-3);
    border: 1px solid var(--accent-3);
}

.bot-status-badge.stopped {
    background: var(--stopped-bg);
    color: var(--accent-4);
    border: 1px solid var(--accent-4);
}

.bot-actions-row { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; }

.log-stream-terminal {
    background: var(--terminal-bg);
    color: var(--terminal-text);
    font-family: 'Consolas', var(--font);
    padding: 1rem;
    border-radius: var(--radius);
    height: 340px;
    overflow-y: auto;
    font-size: 0.73rem;
    line-height: 1.5;
    white-space: pre-wrap;
    border: 1px solid var(--border);
}

.analytics-chart-container {
    height: 290px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--chart-bg);
    position: relative;
    padding: 1rem;
    margin-bottom: 1.75rem;
}

.chart-svg { width: 100%; height: 100%; }
.chart-bar { fill: var(--accent); transition: height 0.5s ease; }
.chart-line { fill: none; stroke: var(--accent-2); stroke-width: 2; }
.chart-grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 4, 4; }

.chart-legend { display: flex; gap: 1.25rem; justify-content: center; font-size: 0.72rem; margin-top: 0.5rem; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; }
.legend-color { width: 10px; height: 10px; border-radius: 2px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.feature-icon {
    font-size: 1.75rem;
    margin-bottom: 0.85rem;
}

.empty-state {
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--text-2);
}

.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.6rem; }
.empty-state p { font-size: 0.875rem; color: var(--text-2); }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

@media (max-width: 1024px) {
    .admin-grid { grid-template-columns: 1fr; }
    .admin-sidebar { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 1rem; margin-bottom: 1rem; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-overlay { display: block; }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: min(280px, 80vw);
        height: 100vh;
        background: var(--navbar-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: calc(var(--nav-h) + 1.5rem) 1.75rem 2rem;
        gap: 0.35rem;
        z-index: 510;
        border-left: 1px solid var(--border);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.3s;
        margin: 0;
        align-items: flex-start;
        transform: translateX(100%);
        visibility: hidden;
    }

    .nav-links.open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
    }

    .nav-item { width: 100%; }

    .nav-item a {
        display: block;
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
        border-bottom: 1px solid var(--border);
        border-right: none;
    }

    .nav-item:last-child a { border-bottom: none; }

    .container { padding: 2rem 1.25rem; }

    .hero { padding: 3rem 1.25rem; min-height: auto; }

    .hero-title { font-size: clamp(1.9rem, 8vw, 2.8rem); }

    .grid-cards { grid-template-columns: 1fr; }

    .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

    .tabs-header { gap: 0; }
    .tab-link { padding: 0.6rem 0.8rem; font-size: 0.72rem; }

    .alerts-container { right: 0.75rem; left: 0.75rem; max-width: none; width: auto; }

    .hero-badge-row { gap: 0.5rem; }
    .hero-badge { font-size: 0.65rem; padding: 0.25rem 0.75rem; }

    .hero-cta { flex-direction: column; align-items: center; }
    .hero-cta .btn { width: 100%; max-width: 280px; }
}

@media (max-width: 480px) {
    .navbar-inner { padding: 0 1.1rem; }
    .page-title { font-size: clamp(1.4rem, 6vw, 1.9rem); }
    .pricing-price { font-size: 2rem; }
}
