/* Anivex Theme – Component Layer (Standard CSS) */

/* ===== GLOBAL UTILS ===== */
.anivex-message-region {
    position: relative;
    z-index: 20;
    margin-top: 0.75rem;
}

.anivex-message-region #system-message-container,
.anivex-message-region .joomla-alert {
    margin-top: 0;
}

#system-message-container {
    position: relative;
    z-index: 2050;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto 1rem;
}

#system-message-container .alert,
#system-message-container joomla-alert,
.joomla-alert {
    border-radius: 1rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.anivex-container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
    max-width: 1140px;
    /* Tighter container for the unique look */
}

.anivex-card {
    background-color: #10161d;
    border: 1px solid #1f2937;
    border-radius: 1rem;
    /* More rounded */
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Glass Effect Utility */
.glass-effect {
    background-color: rgba(16, 22, 29, 0.85);
    /* Dark semi-transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.text-heading {
    color: #e6edf3;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.text-body {
    color: #9aa4b2;
    line-height: 1.6;
}

.text-accent {
    color: #18c1b8;
}

/* ===== UNIQUE PROFILE HEADER (Floating Card Style) ===== */

.profile-hero-bg {
    position: relative;
    width: 100%;
    height: 380px;
    /* Taller banner */
    background-color: #0b0f14;
    background-image: linear-gradient(to top right, #0f172a, #0b0f14);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    /* Fade out bottom */
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.profile-floating-header {
    margin-top: -140px;
    /* Pull up over banner */
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 10;
}

.profile-header-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: 1.25rem;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .profile-header-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 2rem 2.5rem;
    }
}

.profile-avatar-wrapper {
    position: relative;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 1rem;
    /* Squircle */
    object-fit: cover;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .profile-info {
        align-items: flex-start;
    }
}

.profile-name {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.profile-handle {
    font-size: 1rem;
    font-weight: 500;
    color: #18c1b8;
    background: rgba(24, 193, 184, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-block;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
}

@media (min-width: 768px) {
    .profile-actions {
        margin-top: 0;
        width: auto;
    }
}

/* Tab Navigation styled as Pills inside the card */
.profile-nav-pills {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem;
    border-radius: 0.75rem;
}

.nav-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    color: #9aa4b2;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-pill.active,
.nav-pill:hover {
    background-color: #1f2937;
    color: #fff;
}

.nav-pill.active {
    background-color: #18c1b8;
    color: #000;
}


/* ===== BODY UI ===== */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .profile-grid {
        grid-template-columns: 320px 1fr;
    }
}

/* Stats Box (Minimal) */
.stat-box {
    background: #10161d;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #1f2937;
}

.stat-grid-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.stat-mini-item {
    background: #0b0f14;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
}

.stat-mini-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-mini-value {
    font-size: 1.125rem;
    color: #e6edf3;
    font-weight: 700;
}

/* Anime Grid Refined */
.anime-poster-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .anime-poster-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .anime-poster-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1280px) {
    .anime-poster-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.poster-card {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 2/3;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.poster-card:hover {
    transform: translateY(-5px) scale(1.02);
    z-index: 5;
    box-shadow: 0 10px 25px rgba(24, 193, 184, 0.2);
}

.poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 1rem 1rem 1rem;
    background: linear-gradient(to top, #000 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.poster-card:hover .poster-info {
    opacity: 1;
}

.avatar-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0.65rem;
}

.avatar-catalog-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.75rem;
    padding: 0.45rem;
    background: rgba(15, 23, 42, 0.56);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.avatar-catalog-item input {
    display: none;
}

.avatar-catalog-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 0.65rem;
}

.avatar-catalog-item span {
    font-size: 0.65rem;
    color: #a8b3c3;
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-catalog-item:hover {
    border-color: rgba(24, 193, 184, 0.55);
    transform: translateY(-1px);
}

.avatar-catalog-item.is-selected,
.avatar-catalog-item:has(input:checked) {
    border-color: #18c1b8;
    box-shadow: 0 0 0 2px rgba(24, 193, 184, 0.2);
}

/* Activity Feed (bubbles) */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
    border-left: 2px solid #1f2937;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.35rem;
    /* Center on line (2px line, 10px dot -> -4px offset - 1px border = -5px? No. calc) */
    top: 0;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #18c1b8;
    border: 3px solid #0b0f14;
    box-shadow: 0 0 0 1px #18c1b8;
}

.timeline-card {
    background: #10161d;
    border: 1px solid #1f2937;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    gap: 1rem;
}

.anivex-library .table > :not(caption) > * > * {
    background: transparent !important;
    border-bottom-color: rgba(31, 41, 55, 0.65) !important;
}

.anivex-library tbody tr:hover {
    background: rgba(24, 193, 184, 0.04) !important;
}

.anivex-library {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: clamp(1rem, 3vw, 2rem);
    padding-right: clamp(1rem, 3vw, 2rem);
}

.anivex-library .table {
    table-layout: fixed;
}

.anivex-library th,
.anivex-library td {
    vertical-align: middle;
}

.anivex-library th:nth-child(2),
.anivex-library td:nth-child(2) {
    width: 36%;
}

.library-shell {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid rgba(31, 41, 55, 0.9);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(24, 193, 184, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(16, 22, 29, 0.98), rgba(11, 15, 20, 0.98));
}

.library-kicker {
    display: inline-block;
    margin-bottom: 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #18c1b8;
}

.library-profile-link {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #8ddbd6;
}

.library-profile-link:hover {
    color: #18c1b8;
}

.library-toolbar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.library-count {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #9aa4b2;
    font-size: 0.82rem;
    font-weight: 700;
}

.library-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 8.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.library-status-chip.status-watching {
    color: #7ce3dd;
    background: rgba(24, 193, 184, 0.12);
}

.library-status-chip.status-completed {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
}

.library-status-chip.status-plan_to_watch {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
}

.library-status-chip.status-on_hold {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.14);
}

.library-status-chip.status-dropped {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.14);
}

@media (max-width: 991px) {
    .library-shell {
        padding: 1.2rem;
        align-items: flex-start;
        flex-direction: column;
    }

    .library-toolbar {
        width: 100%;
        justify-content: space-between;
    }
}

.anivex-login-page {
    position: relative;
    min-height: calc(100vh - 180px);
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.72fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    overflow: hidden;
    padding: clamp(2rem, 6vw, 6rem) clamp(1.25rem, 5vw, 5rem);
    background:
        radial-gradient(circle at 18% 20%, rgba(24, 193, 184, 0.22), transparent 30%),
        radial-gradient(circle at 78% 78%, rgba(244, 63, 94, 0.12), transparent 28%),
        linear-gradient(135deg, #060a0f 0%, #0b0f14 52%, #10161d 100%);
}

.login-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(30px);
    opacity: 0.45;
    pointer-events: none;
}

.login-orb-a {
    width: 18rem;
    height: 18rem;
    left: -5rem;
    top: 8rem;
    background: #18c1b8;
}

.login-orb-b {
    width: 14rem;
    height: 14rem;
    right: 10%;
    bottom: -4rem;
    background: #f43f5e;
}

.login-showcase,
.login-card {
    position: relative;
    z-index: 1;
}

.login-kicker {
    display: inline-flex;
    color: #18c1b8;
    font-weight: 900;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.login-showcase h1 {
    max-width: 10ch;
    color: #fff;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 0.92;
    margin: 0;
}

.login-showcase p {
    max-width: 34rem;
    color: #9aa4b2;
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 1.5rem 0 0;
}

.login-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.login-feature-list span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    color: #dbe6ef;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-feature-list i {
    color: #18c1b8;
}

.login-card {
    padding: clamp(1.5rem, 3vw, 2.4rem);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 15, 22, 0.82);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(22px);
}

.login-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.login-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.2rem;
    color: #061014;
    background: #18c1b8;
    font-size: 1.45rem;
}

.login-card h2 {
    margin: 0;
    color: #fff;
    font-size: 1.7rem;
}

.login-card p {
    margin: 0.25rem 0 0;
    color: #8390a2;
}

.login-fields .control-group,
.login-fields .mb-3 {
    margin-bottom: 1rem;
}

.login-fields label {
    display: block;
    color: #b5c0cf;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.login-fields input {
    width: 100%;
    min-height: 3.25rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    padding: 0.75rem 1rem;
}

.login-fields input:focus {
    border-color: rgba(24, 193, 184, 0.7);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(24, 193, 184, 0.12);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #9aa4b2;
    margin: 1rem 0 1.2rem;
}

.login-submit,
.login-secondary-action {
    width: 100%;
    min-height: 3.25rem;
    border: 0;
    border-radius: 1rem;
    font-weight: 900;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: #061014;
    background: #18c1b8;
}

.login-submit:hover {
    background: #23d7ce;
}

.login-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 0.8rem;
}

.login-secondary-action .icon,
.login-secondary-action i,
.login-secondary-action svg,
.login-secondary-action span[class^="icon-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
}

.anivex-signup-page .login-showcase h1 {
    max-width: 11ch;
}

.login-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1.3rem;
    font-size: 0.9rem;
}

.login-options a {
    color: #8ddbd6;
}

@media (max-width: 991px) {
    .anivex-login-page {
        grid-template-columns: 1fr;
    }

    .login-showcase h1 {
        max-width: none;
    }
}

.anivex-home {
    min-height: 100vh;
}

.home-hero {
    min-height: 88vh;
    display: flex;
    align-items: end;
    background:
        radial-gradient(circle at top left, rgba(24, 193, 184, 0.16), transparent 32%),
        linear-gradient(180deg, #081018 0%, #0b0f14 52%, #0b0f14 100%);
}

.home-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    transform: scale(1.05);
    filter: blur(8px);
}

.home-hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11, 15, 20, 0.96) 5%, rgba(11, 15, 20, 0.78) 48%, rgba(11, 15, 20, 0.92) 100%),
        linear-gradient(180deg, rgba(11, 15, 20, 0.2), rgba(11, 15, 20, 1));
}

.home-kicker,
.home-section-kicker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: #18c1b8;
    margin-bottom: 1rem;
}

.home-title {
    max-width: 12ch;
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.96;
    margin: 0;
}

.home-subtitle {
    max-width: 44rem;
    margin-top: 1.5rem;
    color: #9aa4b2;
    font-size: 1.05rem;
    line-height: 1.8;
}

.home-cta,
.home-ghost-btn {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.35rem;
    border-radius: 999px;
    font-weight: 700;
}

.home-ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.02);
}

.home-ghost-btn:hover {
    border-color: rgba(24, 193, 184, 0.45);
    color: #18c1b8;
}

.home-metrics {
    max-width: 38rem;
}

.home-metric-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.25rem;
    padding: 1rem 1.1rem;
}

.home-metric-card strong {
    display: block;
    color: #fff;
    font-size: 1.3rem;
}

.home-metric-card span {
    display: block;
    margin-top: 0.2rem;
    color: #8b97a8;
    font-size: 0.85rem;
}

.home-spotlight-card {
    display: block;
    position: relative;
    border-radius: 1.75rem;
    overflow: hidden;
    background: #10161d;
    min-height: 32rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.home-spotlight-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-spotlight-copy {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2rem;
    background: linear-gradient(180deg, rgba(11, 15, 20, 0) 0%, rgba(11, 15, 20, 0.95) 65%);
}

.home-spotlight-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(24, 193, 184, 0.16);
    color: #7ce3dd;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-spotlight-copy h2 {
    margin: 1rem 0 0.8rem;
    font-size: 2rem;
}

.home-spotlight-copy p {
    margin: 0;
    color: #b5becc;
    line-height: 1.7;
}

.home-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.home-section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.home-section-link {
    color: #18c1b8;
    font-weight: 700;
}

.home-anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.1rem;
}

.home-anime-card {
    position: relative;
    display: block;
    border-radius: 1.25rem;
    overflow: hidden;
    aspect-ratio: 0.72;
    background: #10161d;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-anime-card:hover {
    transform: translateY(-4px);
}

.home-anime-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.home-anime-card:hover .home-anime-poster {
    transform: scale(1.04);
}

.home-anime-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 15, 20, 0.04) 30%, rgba(11, 15, 20, 0.95) 100%);
}

.home-anime-copy {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1rem;
}

.home-anime-copy strong,
.home-anime-copy span {
    display: block;
}

.home-anime-copy strong {
    color: #fff;
    font-size: 0.96rem;
    line-height: 1.35;
}

.home-anime-copy span {
    margin-top: 0.3rem;
    color: #8ddbd6;
    font-size: 0.8rem;
}

.home-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.home-news-card,
.home-news-empty {
    background: linear-gradient(180deg, rgba(16, 22, 29, 0.96), rgba(12, 18, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1.35rem;
}

.home-news-card h3 {
    margin: 0.5rem 0 0.8rem;
    font-size: 1.15rem;
}

.home-news-card p,
.home-news-empty p {
    margin: 0;
    color: #94a0b1;
    line-height: 1.75;
}

.home-news-meta {
    color: #6f7d8f;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 991px) {
    .home-title {
        max-width: none;
    }

    .home-spotlight-card {
        min-height: 24rem;
    }
}
