/* ============================================================
   pages.css — Page-Specific Styles
   logsearch.xyz
   ============================================================ */

/* ----- Hero (Landing) ----- */
.hero {
    text-align: center;
    padding: var(--space-24) 0 var(--space-20);
    position: relative;
    overflow: hidden;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--color-accent-muted);
    color: var(--color-accent-text);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-8);
    animation: badgeFloat 3s ease-in-out infinite;
    border: 1px solid rgba(34, 211, 238, 0.15);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
}

@keyframes badgeFloat {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
    }

    50% {
        transform: translateY(-6px);
        box-shadow: 0 0 30px rgba(34, 211, 238, 0.2);
    }
}

.hero__title {
    font-size: var(--fs-4xl);
    font-weight: var(--fw-extrabold);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-6);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.02em;
}

.hero__title em {
    font-style: normal;
    color: var(--color-accent-text);
    text-shadow: 0 0 40px rgba(34, 211, 238, 0.25);
}

.hero__subtitle {
    font-size: var(--fs-lg);
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0 auto var(--space-10);
    line-height: var(--lh-relaxed);
}

.hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero__actions .btn {
    border-radius: var(--radius-full);
    transition: all 0.4s var(--ease-smooth);
}

.hero__actions .btn--primary:hover {
    transform: translateY(-2px);
}

.hero__actions .btn--secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.3);
}

/* ===== Hero Demo Terminal ===== */
.hero-demo {
    margin-top: var(--space-12);
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(42, 46, 66, 0.5);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 1px rgba(34, 211, 238, 0.1);
    text-align: left;
    animation: demoSlideUp 0.8s 0.3s var(--ease-smooth) both;
}

@keyframes demoSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-demo__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: rgba(22, 24, 34, 0.9);
    border-bottom: 1px solid rgba(42, 46, 66, 0.4);
}

.hero-demo__dots {
    display: flex;
    gap: 6px;
}

.hero-demo__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hero-demo__dots span:nth-child(1) {
    background: #ff5f57;
}

.hero-demo__dots span:nth-child(2) {
    background: #ffbd2e;
}

.hero-demo__dots span:nth-child(3) {
    background: #28ca41;
}

.hero-demo__title {
    flex: 1;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    text-align: center;
}

.hero-demo__status {
    font-size: var(--fs-xs);
    color: #28ca41;
    font-weight: var(--fw-semibold);
}

.hero-demo__body {
    display: flex;
    min-height: 220px;
}

.hero-demo__chat {
    flex: 1;
    padding: var(--space-5);
    border-right: 1px solid rgba(42, 46, 66, 0.3);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    overflow: hidden;
}

.hero-demo__results {
    width: 260px;
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    overflow: hidden;
}

/* Lines */
.demo-line {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
}

.demo-line--cmd {
    color: var(--color-accent-text);
}

.demo-line--info {
    color: var(--color-text-secondary);
}

.demo-accent {
    color: var(--color-accent-text);
}

.demo-muted {
    color: var(--color-text-muted);
    font-size: 0.7rem;
}

/* Cursor */
.demo-cursor {
    color: var(--color-accent-text);
    animation: cursorBlink 0.6s step-end infinite;
    margin-left: 1px;
    font-size: 0.7rem;
}

@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Result rows */
.demo-result {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(42, 46, 66, 0.2);
    border: 1px solid rgba(42, 46, 66, 0.3);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    transition: all 0.3s var(--ease-smooth);
}

.demo-result:hover {
    background: rgba(42, 46, 66, 0.4);
    border-color: rgba(34, 211, 238, 0.15);
}

.demo-result__index {
    color: var(--color-text-muted);
    min-width: 20px;
    opacity: 0.5;
}

.demo-result__user {
    color: var(--color-accent-text);
    font-weight: var(--fw-medium);
}

.demo-result__sep {
    color: var(--color-text-muted);
    opacity: 0.4;
}

.demo-result__pass {
    color: var(--color-text-secondary);
}

/* Download button */
.demo-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-accent-muted);
    color: var(--color-accent-text);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    cursor: pointer;
    transition: all 0.4s var(--ease-smooth);
    border: 1px solid rgba(34, 211, 238, 0.15);
}

.demo-download:hover {
    background: rgba(34, 211, 238, 0.15);
}

.demo-download--clicked {
    background: rgba(40, 202, 65, 0.12);
    color: #28ca41;
    border-color: rgba(40, 202, 65, 0.2);
}

.demo-download__icon {
    font-size: 0.85rem;
}

/* Fade-in animation class */
.demo-fadein {
    animation: demoFadeIn 0.4s var(--ease-smooth) both;
}

@keyframes demoFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .hero-demo__body {
        flex-direction: column;
    }

    .hero-demo__results {
        width: 100%;
        border-top: 1px solid rgba(42, 46, 66, 0.3);
    }

    .hero-demo__chat {
        border-right: none;
    }
}

/* Features Section */
.features {
    padding: var(--space-20) 0;
}

.features__header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.features__header h2 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-4);
    letter-spacing: -0.01em;
}

.features__header p {
    color: var(--color-text-secondary);
    max-width: 480px;
    margin: 0 auto;
}

/* Scroll-reveal animation for cards */
.card--reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s var(--ease-smooth);
}

.card--reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Trust Section */
.trust {
    padding: var(--space-12) 0;
    border-top: 1px solid rgba(42, 46, 66, 0.4);
}

.trust__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.trust__link {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.trust__link:hover {
    color: var(--color-accent-text);
    background: var(--color-accent-muted);
}

.trust__divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-border-light);
}

/* ----- Status Page ----- */
.status-page {
    padding: var(--space-12) 0 var(--space-20);
}

.status-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.status-page__filters {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.filter-btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn--active {
    color: var(--color-text-primary);
    border-color: var(--color-accent);
    background: var(--color-accent-muted);
}

/* ----- Docs Page ----- */
.docs-page {
    padding: var(--space-12) 0 var(--space-20);
}

.docs-page__header {
    margin-bottom: var(--space-10);
}

.docs-page__header h1 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-3);
}

.docs-page__header p {
    color: var(--color-text-secondary);
}

.docs-section {
    margin-bottom: var(--space-12);
}

.docs-section__title {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.endpoint-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    transition: all 0.3s var(--ease-smooth);
}

.endpoint-card:hover {
    border-color: rgba(42, 46, 66, 0.6);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.endpoint-card__method {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    border-radius: var(--radius-sm);
    margin-right: var(--space-3);
    text-transform: uppercase;
}

.endpoint-card__method--get {
    background: var(--color-success-muted);
    color: var(--color-success);
}

.endpoint-card__method--post {
    background: var(--color-info-muted);
    color: var(--color-info);
}

.endpoint-card__path {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--color-text-primary);
}

.endpoint-card__desc {
    margin-top: var(--space-3);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

/* Error Codes Table */
.error-table {
    margin-top: var(--space-4);
}

/* ----- Pricing Page ----- */
.pricing-page {
    padding: var(--space-12) 0 var(--space-20);
    text-align: center;
}

.pricing-page__header {
    margin-bottom: var(--space-12);
}

.pricing-page__header h1 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-3);
}

.pricing-page__header p {
    color: var(--color-text-secondary);
}

.pricing-card {
    text-align: left;
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
}

.pricing-card__name {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-accent-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-3);
}

.pricing-card__price {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-extrabold);
    margin-bottom: var(--space-2);
}

.pricing-card__price span {
    font-size: var(--fs-sm);
    font-weight: var(--fw-regular);
    color: var(--color-text-muted);
}

.pricing-card__desc {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

.pricing-card__features {
    margin-bottom: var(--space-8);
    flex: 1;
}

.pricing-card__feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    padding: var(--space-2) 0;
}

.pricing-card__feature::before {
    content: "✓";
    color: var(--color-success);
    font-weight: var(--fw-bold);
    flex-shrink: 0;
}

/* ----- Auth Pages ----- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--navbar-height) - 200px);
    padding: var(--space-12) var(--space-4);
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-card__header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-card__header h1 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-2);
}

.auth-card__header p {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.auth-card__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.auth-card__footer {
    text-align: center;
    margin-top: var(--space-6);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.auth-card__footer a {
    color: var(--color-accent-text);
    font-weight: var(--fw-medium);
}

/* Auth Logo Icon */
.auth-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.auth-card__logo-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--color-accent-muted);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
}

/* Modern Terms Agreement */
.terms-agreement {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.terms-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.terms-item:hover {
    border-color: var(--color-border-light);
    background: var(--color-bg-hover);
}

.terms-item:has(input:checked) {
    border-color: var(--color-accent);
    background: rgba(56, 189, 248, 0.04);
}

/* Toggle Switch */
.terms-item__toggle {
    position: relative;
    flex-shrink: 0;
}

.terms-item__toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.terms-item__switch {
    display: block;
    width: 40px;
    height: 22px;
    background: var(--color-bg-hover);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-full);
    position: relative;
    transition: all 0.25s ease;
}

.terms-item__switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--color-text-muted);
    border-radius: 50%;
    transition: all 0.25s ease;
}

.terms-item__toggle input:checked+.terms-item__switch {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.terms-item__toggle input:checked+.terms-item__switch::after {
    left: 20px;
    background: var(--color-text-inverse);
}

/* Terms Content */
.terms-item__content {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-1);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-relaxed);
}

.terms-item__link {
    color: var(--color-accent-text);
    font-weight: var(--fw-semibold);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.terms-item__link:hover {
    color: var(--color-accent);
}

.terms-item__text {
    color: var(--color-text-muted);
}

/* Auth Submit Button */
.auth-submit-btn {
    position: relative;
    overflow: hidden;
    font-size: var(--fs-md) !important;
    font-weight: var(--fw-bold) !important;
    padding: var(--space-4) var(--space-8) !important;
    gap: var(--space-3) !important;
    letter-spacing: 0.01em;
    transition: all 0.3s ease !important;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.auth-submit-btn__arrow {
    display: inline-flex;
    transition: transform 0.3s ease;
    font-size: 1.1em;
}

.auth-submit-btn:hover .auth-submit-btn__arrow {
    transform: translateX(4px);
}

/* ----- Dashboard Layout ----- */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
}

.dashboard-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-8) var(--space-10);
    max-width: calc(100% - var(--sidebar-width));
}

.dashboard-content__header {
    margin-bottom: var(--space-8);
}

.dashboard-content__header h1 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-2);
}

.dashboard-content__header p {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

/* Dashboard Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

/* CTA Section Styling */
.cta-section {
    background: var(--color-bg-secondary);
    border-top: 1px solid rgba(42, 46, 66, 0.4);
    border-bottom: 1px solid rgba(42, 46, 66, 0.4);
    position: relative;
}

.stat-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all 0.3s var(--ease-smooth);
}

.stat-card:hover {
    border-color: rgba(42, 46, 66, 0.6);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card__label {
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-2);
}

.stat-card__value {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
}

.stat-card__change {
    font-size: var(--fs-xs);
    color: var(--color-success);
    margin-top: var(--space-1);
}

/* Keys Page */
.keys-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.key-prefix {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--color-accent-text);
    background: var(--color-accent-muted);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

/* Usage Page */
.usage-chart-placeholder {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    min-height: 300px;
    margin-bottom: var(--space-6);
}

/* ----- 404 Page ----- */
.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--navbar-height) - 200px);
    text-align: center;
    padding: var(--space-12);
}

.not-found__code {
    font-size: 6rem;
    font-weight: var(--fw-extrabold);
    color: var(--color-accent-text);
    line-height: 1;
    margin-bottom: var(--space-4);
    opacity: 0.3;
    text-shadow: 0 0 40px rgba(34, 211, 238, 0.2);
}

.not-found__title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-3);
}

.not-found__desc {
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    max-width: 400px;
}

@media (max-width: 768px) {
    .dashboard-content {
        margin-left: 0;
        max-width: 100%;
        padding: var(--space-6) var(--space-4);
    }

    .hero {
        padding: var(--space-12) 0;
    }

    .not-found__code {
        font-size: 4rem;
    }
}