﻿/* Unified future theme */
@keyframes eomaia-command-confirm {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 167, 183, 0.34);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(0, 167, 183, 0.12), 0 0 24px rgba(0, 167, 183, 0.2);
        filter: saturate(1.2);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 167, 183, 0);
        filter: none;
    }
}

@keyframes eomaia-materialize {
    0% {
        opacity: 0;
        transform: translateY(9px) scale(0.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes eomaia-scan-sweep {
    0% {
        transform: translateX(-110%);
    }

    100% {
        transform: translateX(110%);
    }
}

@keyframes eomaia-status-pulse {
    0%,
    100% {
        opacity: 0.72;
        transform: scale(0.92);
    }

    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

body {
    background:
        radial-gradient(circle at 15% 12%, rgba(0, 167, 183, 0.14), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(124, 58, 237, 0.11), transparent 30%),
        linear-gradient(135deg, transparent 0 48%, rgba(0, 167, 183, 0.045) 48% 49%, transparent 49% 100%),
        linear-gradient(90deg, var(--eomaia-future-bg-grid) 1px, transparent 1px),
        linear-gradient(180deg, var(--eomaia-future-scanline) 1px, transparent 1px),
        linear-gradient(180deg, rgba(20, 184, 166, 0.06) 0%, rgba(124, 58, 237, 0.035) 42%, transparent 72%),
        var(--eomaia-future-bg);
    background-attachment: fixed;
    background-size: auto, auto, 34px 34px, 28px 28px, 100% 4px, 100% 100%, auto;
    color: var(--eomaia-future-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

::selection {
    background: rgba(0, 167, 183, 0.22);
    color: var(--eomaia-future-ink);
}

.btn {
    border-radius: 8px;
    font-weight: 800;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.btn,
button,
a,
[role="button"],
.eomaia-bar-item,
.eomaia-nav-item,
.eomaia-icon-control,
.eomaia-material-action {
    -webkit-tap-highlight-color: transparent;
}

.btn.is-actuating,
button.is-actuating,
a.is-actuating,
[role="button"].is-actuating,
.eomaia-bar-item.is-actuating,
.eomaia-nav-item.is-actuating,
.eomaia-icon-control.is-actuating,
.eomaia-material-action.is-actuating {
    filter: saturate(1.16);
    transform: translateY(1px) scale(0.985);
}

.btn.is-commanded,
button.is-commanded,
a.is-commanded,
[role="button"].is-commanded,
.eomaia-bar-item.is-commanded,
.eomaia-nav-item.is-commanded,
.eomaia-icon-control.is-commanded,
.eomaia-material-action.is-commanded {
    animation: eomaia-command-confirm 0.42s ease-out;
}

.btn-primary,
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary.is-active,
.btn-outline-primary.active {
    background-color: var(--eomaia-future-cyan);
    border-color: var(--eomaia-future-cyan);
    color: #ffffff;
}

.btn-outline-primary {
    border-color: rgba(0, 167, 183, 0.5);
    color: #007f8f;
}

.btn-outline-secondary {
    background-color: rgba(255, 255, 255, 0.52);
    border-color: var(--eomaia-future-line-soft);
    color: var(--eomaia-future-muted);
}

.btn:focus-visible,
.eomaia-bar-item:focus-visible,
.eomaia-icon-control:focus-visible,
.eomaia-nav-item:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 167, 183, 0.2), 0 0 22px rgba(0, 167, 183, 0.16);
    outline: none;
}

.btn-danger {
    background-color: #dc2626;
    border-color: #dc2626;
}

.dropdown-menu {
    background: var(--eomaia-future-panel-strong);
    border-color: var(--eomaia-future-line);
    border-radius: 8px;
    box-shadow: var(--eomaia-future-shadow);
    overflow: hidden;
    padding: 6px;
    position: relative;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.dropdown-menu::before,
.eomaia-form-shell::before,
.eomaia-detail-panel::before,
.eomaia-confirm-dialog::before {
    background: linear-gradient(90deg, rgba(0, 167, 183, 0.68), rgba(124, 58, 237, 0.3), transparent);
    content: "";
    height: 2px;
    inset: 0 0 auto;
    pointer-events: none;
    position: absolute;
}

.dropdown-item {
    border-radius: 6px;
    color: var(--eomaia-future-ink);
    font-weight: 750;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 167, 183, 0.11);
    color: #006a78;
}

.eomaia-form-shell,
.eomaia-page-section,
.eomaia-detail-material,
.eomaia-detail-panel,
.eomaia-form-panel,
.eomaia-form-check,
.eomaia-form-switch,
.eomaia-confirm-dialog {
    background: var(--eomaia-future-panel);
    border-color: var(--eomaia-future-line);
    box-shadow: var(--eomaia-future-shadow);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    overflow: hidden;
    position: relative;
}

.eomaia-static-copy .eomaia-page-section {
    overflow: hidden;
    padding-left: 22px;
    position: relative;
}

.eomaia-static-copy .eomaia-page-section::before {
    background: linear-gradient(180deg, var(--eomaia-future-cyan), var(--eomaia-future-violet));
    content: "";
    inset: 0 auto 0 0;
    pointer-events: none;
    position: absolute;
    width: 3px;
}

.eomaia-static-copy h1,
.eomaia-static-copy h2 {
    color: #0f172a;
}

.eomaia-form-control,
.eomaia-inline-input,
input.form-control,
textarea.form-control,
select.form-select {
    background-color: rgba(255, 255, 255, 0.78);
    border-color: var(--eomaia-future-line-soft);
    color: var(--eomaia-future-ink);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.eomaia-form-control:focus,
.eomaia-inline-input:focus,
input.form-control:focus,
textarea.form-control:focus,
select.form-select:focus {
    background-color: rgba(255, 255, 255, 0.92);
    border-color: var(--eomaia-future-cyan);
    box-shadow: 0 0 0 3px rgba(0, 167, 183, 0.18);
}

button:disabled,
.btn:disabled {
    filter: saturate(0.72);
}

#underBar.eomaia-bottom-nav,
.eomaia-inline-bar,
.eomaia-icon-bar,
#chatTitle,
#dialog > span,
#publicBar,
#titleBar,
#registerBar,
#commentBar,
#groupBar,
#camera,
#qrcode,
#setting,
#follow,
#message {
    background: rgba(250, 253, 255, 0.88) !important;
    border-color: var(--eomaia-future-line);
    box-shadow: var(--eomaia-future-glow), inset 0 1px 0 rgba(255, 255, 255, 0.68);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.eomaia-inline-bar,
.eomaia-icon-bar,
#underBar.eomaia-bottom-nav,
#chatTitle {
    background-image:
        linear-gradient(180deg, var(--eomaia-future-highlight), rgba(255, 255, 255, 0) 38%),
        linear-gradient(90deg, rgba(0, 167, 183, 0.08) 1px, transparent 1px) !important;
    background-size: auto, 28px 28px;
}

#underBar.eomaia-bottom-nav {
    padding-bottom: max(4px, env(safe-area-inset-bottom, 0px));
}

#underBar .eomaia-nav-item {
    border-top-color: transparent;
    color: #526170;
    overflow: hidden;
    position: relative;
}

#underBar .eomaia-nav-item::after {
    background: linear-gradient(90deg, transparent, rgba(0, 167, 183, 0.42), transparent);
    content: "";
    height: 1px;
    inset: auto 12% 4px;
    opacity: 0;
    position: absolute;
    transform: scaleX(0.4);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

#underBar .eomaia-nav-item.is-active {
    background: rgba(0, 167, 183, 0.1);
    border-top-color: var(--eomaia-future-cyan);
    box-shadow: inset 0 2px 0 var(--eomaia-future-cyan), 0 0 18px rgba(0, 167, 183, 0.12);
    color: #006a78;
}

#underBar .eomaia-nav-item.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.eomaia-bar-item,
.eomaia-icon-bar > span {
    color: #526170;
}

.eomaia-icon-bar > span:hover,
.eomaia-icon-bar > span:focus,
.eomaia-icon-bar > span.material-icons,
.eomaia-icon-bar > span.is-active {
    background: rgba(0, 167, 183, 0.1);
    box-shadow: inset 0 0 0 1px rgba(0, 167, 183, 0.18);
    color: #006a78;
}

#add {
    background: linear-gradient(135deg, var(--eomaia-future-cyan), var(--eomaia-future-violet));
    border-color: rgba(255, 255, 255, 0.62);
    box-shadow: 0 12px 34px rgba(0, 167, 183, 0.26), 0 0 0 1px rgba(124, 58, 237, 0.16);
    overflow: hidden;
}

#add::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.64), transparent);
    content: "";
    height: 100%;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: translateX(-120%);
    width: 60%;
}

#add:hover::after,
#add:focus::after {
    animation: eomaia-scan-sweep 0.72s ease-out;
}

#profileBox {
    background:
        linear-gradient(90deg, rgba(0, 167, 183, 0.1) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 247, 250, 0.9)) !important;
    background-size: 32px 32px, auto;
    border-color: var(--eomaia-future-line);
}

#profileBox .container-fluid {
    max-width: 980px;
    padding: clamp(10px, 2.2vw, 16px);
}

#profileBox .row {
    align-content: center;
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin-left: 0;
    margin-right: 0;
}

#profileBox .row > .col-12,
#profileBox .row > .col-6 {
    flex: none;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    width: auto;
}

#profileBox .row > .col-12 {
    grid-column: 1 / -1;
}

#profileBox .row > .col-6 {
    grid-column: span 6;
}

#profileBox button,
button[data-type="work"],
button[data-type="image"],
button[data-type="audio"],
button[data-type="font"],
button[data-type="user"],
button[data-type="dm"],
button[data-type="member"],
#userArea > a > button,
.eomaia-detail-author,
.eomaia-detail-toggle {
    background: var(--eomaia-future-panel-strong) !important;
    border-color: var(--eomaia-future-line-soft) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    position: relative;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

button[data-type] {
    overflow: hidden;
}

.eomaia-user-card,
.eomaia-comment-card {
    overflow: hidden;
    position: relative;
}

button[data-type]::after,
.eomaia-user-card::after,
.eomaia-comment-card::after {
    background: linear-gradient(90deg, transparent, rgba(0, 167, 183, 0.18), rgba(255, 255, 255, 0.34), transparent);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: translateX(-115%);
}

button[data-type]:hover::after,
button[data-type]:focus::after,
.eomaia-user-card:hover::after,
.eomaia-user-card:focus::after,
.eomaia-comment-card:hover::after,
.eomaia-comment-card:focus-within::after {
    animation: eomaia-scan-sweep 0.8s ease-out;
    opacity: 1;
}

@media (hover: hover) {
    #profileBox button:hover,
    #profileBox button:focus,
    button[data-type="work"]:hover,
    button[data-type="image"]:hover,
    button[data-type="audio"]:hover,
    button[data-type="font"]:hover,
    button[data-type="user"]:hover,
    button[data-type="dm"]:hover,
    button[data-type="member"]:hover,
    #userArea > a > button:hover {
        border-color: var(--eomaia-future-cyan) !important;
        box-shadow: 0 12px 30px rgba(0, 167, 183, 0.16);
        transform: translateY(-1px);
    }
}

button[data-type="work"],
button[data-type="image"],
button[data-type="audio"],
button[data-type="font"],
button[data-type="user"],
button[data-type="dm"],
button[data-type="member"],
.eomaia-user-card {
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, rgba(0, 167, 183, 0.06) 1px, transparent 1px) !important;
    background-size: auto, 30px 30px;
}

button[data-type="work"],
button[data-type="image"],
button[data-type="audio"],
button[data-type="font"],
button[data-type="work"]:hover,
button[data-type="image"]:hover,
button[data-type="audio"]:hover,
button[data-type="font"]:hover,
button[data-type="work"]:focus,
button[data-type="image"]:focus,
button[data-type="audio"]:focus,
button[data-type="font"]:focus,
button[data-type="work"].btn-primary,
button[data-type="image"].btn-primary,
button[data-type="audio"].btn-primary,
button[data-type="font"].btn-primary,
button[data-type="work"].active,
button[data-type="image"].active,
button[data-type="audio"].active,
button[data-type="font"].active,
button[data-type="dm"],
button[data-type="member"],
button[data-type="dm"]:hover,
button[data-type="member"]:hover,
button[data-type="dm"]:focus,
button[data-type="member"]:focus,
.eomaia-user-card,
.eomaia-user-card:hover,
.eomaia-user-card:focus,
#userArea > a > button,
#userArea > a > button:hover,
#userArea > a > button:focus {
    color: var(--eomaia-future-ink);
}

button[data-type="user"].btn-outline-secondary,
button[data-type="user"].btn-outline-secondary:hover,
button[data-type="user"].btn-outline-secondary:focus {
    color: var(--eomaia-future-muted);
}

button[data-type="user"].btn-outline-danger,
button[data-type="user"].btn-outline-danger:hover,
button[data-type="user"].btn-outline-danger:focus {
    color: var(--eomaia-danger);
}

button[data-type] .eomaia-material-title,
button[data-type] .eomaia-material-pill,
button[data-type] .eomaia-material-pill-icon,
button[data-type] .eomaia-connection-name,
button[data-type] .eomaia-user-card-name,
.eomaia-user-card .eomaia-user-card-name,
button[data-type]:hover .eomaia-material-title,
button[data-type]:hover .eomaia-material-pill,
button[data-type]:hover .eomaia-material-pill-icon,
button[data-type]:hover .eomaia-connection-name,
button[data-type]:hover .eomaia-user-card-name,
.eomaia-user-card:hover .eomaia-user-card-name,
button[data-type]:focus .eomaia-material-title,
button[data-type]:focus .eomaia-material-pill,
button[data-type]:focus .eomaia-material-pill-icon,
button[data-type]:focus .eomaia-connection-name,
button[data-type]:focus .eomaia-user-card-name,
.eomaia-user-card:focus .eomaia-user-card-name,
button[data-type].btn-primary .eomaia-material-title,
button[data-type].btn-primary .eomaia-material-pill,
button[data-type].btn-primary .eomaia-material-pill-icon,
button[data-type].btn-primary .eomaia-connection-name,
button[data-type].btn-primary .eomaia-user-card-name,
button[data-type].active .eomaia-material-title,
button[data-type].active .eomaia-material-pill,
button[data-type].active .eomaia-material-pill-icon,
button[data-type].active .eomaia-connection-name,
button[data-type].active .eomaia-user-card-name {
    color: var(--eomaia-future-ink);
}

button[data-type] .eomaia-material-meta,
button[data-type]:hover .eomaia-material-meta,
button[data-type]:focus .eomaia-material-meta,
button[data-type].btn-primary .eomaia-material-meta,
button[data-type].active .eomaia-material-meta {
    color: var(--eomaia-future-muted);
}

.eomaia-comment-author:hover,
.eomaia-comment-author:focus,
.eomaia-comment-author.active {
    color: var(--eomaia-future-ink);
}

.eomaia-comment-meta,
.eomaia-comment-card:hover .eomaia-comment-meta,
.eomaia-comment-card:focus-within .eomaia-comment-meta {
    color: var(--eomaia-future-muted);
}

#profileBox #username {
    align-items: center;
    display: flex;
    gap: 9px;
    justify-content: flex-start;
    min-height: 52px !important;
    padding: 10px 12px !important;
}

#profileBox #username::before {
    align-items: center;
    background: rgba(0, 167, 183, 0.12);
    border: 1px solid rgba(0, 167, 183, 0.22);
    border-radius: 8px;
    color: #006a78;
    content: "ID";
    display: inline-flex;
    flex: 0 0 36px;
    font-size: 12px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    line-height: 1;
    width: 36px;
}

.eomaia-profile-intro {
    background: rgba(255, 255, 255, 0.68) !important;
    border-style: dashed !important;
    line-height: 1.5 !important;
    max-height: clamp(46px, 8vh, 72px);
    padding: 9px 11px !important;
}

#chatTitle::before {
    background: rgba(0, 167, 183, 0.12);
    box-shadow: inset 0 0 0 1px rgba(0, 167, 183, 0.2);
    color: #006a78;
}

#chatTitle::after {
    background: var(--eomaia-future-green);
    animation: eomaia-status-pulse 1.7s ease-in-out infinite;
}

.eomaia-chat-thread {
    background:
        linear-gradient(90deg, rgba(100, 116, 139, 0.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(232, 242, 247, 0.86));
    background-size: 28px 28px, auto;
    gap: 6px;
    position: relative;
}

.eomaia-chat-bubble {
    animation: eomaia-materialize 0.28s ease-out both;
    box-shadow: 0 7px 22px rgba(15, 23, 42, 0.1);
    padding: 9px 11px;
    position: relative;
}

.eomaia-chat-self {
    background: linear-gradient(180deg, rgba(212, 246, 249, 0.96), rgba(190, 237, 244, 0.96));
    border-color: rgba(0, 167, 183, 0.22);
}

.eomaia-chat-other {
    background: rgba(255, 255, 255, 0.96);
}

.eomaia-material-footer {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, 0.62));
    gap: 6px;
    padding: 38px 44px 9px 9px;
}

.eomaia-material-pill {
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.eomaia-material-action {
    background: rgba(250, 253, 255, 0.9);
    border-color: rgba(0, 167, 183, 0.28);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.64), 0 8px 20px rgba(15, 23, 42, 0.12);
    color: #006a78;
}

.eomaia-material-action:hover,
.eomaia-material-action:focus {
    background: rgba(0, 167, 183, 0.12);
    box-shadow: 0 0 0 1px rgba(0, 167, 183, 0.28), 0 0 20px rgba(0, 167, 183, 0.2);
}

button[data-type="audio"],
button[data-type="font"] {
    min-height: 72px;
    padding: 12px 44px 12px 12px;
}

.eomaia-material-type-icon,
.eomaia-connection-icon,
.eomaia-user-card-icon {
    background: rgba(0, 167, 183, 0.11);
    border-radius: 8px;
    color: #006a78;
}

.eomaia-detail-layout {
    margin-left: auto;
    margin-right: auto;
    max-width: 1120px;
    row-gap: 12px;
}

.eomaia-form-shell {
    padding: clamp(14px, 2.4vw, 20px);
}

.eomaia-form-tab,
.eomaia-form-submit {
    min-height: 48px;
}

.eomaia-slide-area {
    border-color: rgba(0, 167, 183, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 -18px 52px rgba(0, 167, 183, 0.14);
}

.eomaia-slide-area[data-slide-open="true"] {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 -20px 60px rgba(0, 167, 183, 0.18);
}

.eomaia-dialog-shell {
    background:
        linear-gradient(90deg, rgba(0, 167, 183, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(250, 253, 255, 0.96), rgba(238, 247, 250, 0.96)) !important;
    background-size: 28px 28px, auto;
    border-top: 1px solid rgba(0, 167, 183, 0.22);
    box-shadow: 0 -18px 56px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.eomaia-dialog-shell::before {
    background: linear-gradient(90deg, transparent, rgba(0, 167, 183, 0.76), rgba(124, 58, 237, 0.42), transparent);
    box-shadow: 0 0 18px rgba(0, 167, 183, 0.22);
    content: "";
    height: 2px;
    inset: 0 0 auto;
    pointer-events: none;
    position: absolute;
}

.eomaia-toast {
    background:
        linear-gradient(90deg, rgba(0, 167, 183, 0.14), transparent 38%),
        rgba(250, 253, 255, 0.96);
    border: 1px solid rgba(0, 167, 183, 0.28);
    box-shadow: 0 12px 34px rgba(0, 167, 183, 0.18);
    color: var(--eomaia-future-ink);
}

.eomaia-confirm-host {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.eomaia-confirm-dialog {
    border: 1px solid rgba(0, 167, 183, 0.28);
}

@media (max-width: 520px) {
    #profileBox .container-fluid {
        padding: 9px;
    }

    #profileBox #username {
        min-height: 48px !important;
    }

    #profileBox #username::before {
        flex-basis: 32px;
        height: 32px;
        width: 32px;
    }

    .eomaia-profile-intro {
        max-height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn.is-commanded,
    button.is-commanded,
    a.is-commanded,
    [role="button"].is-commanded,
    .eomaia-bar-item.is-commanded,
    .eomaia-nav-item.is-commanded,
    .eomaia-icon-control.is-commanded,
    .eomaia-material-action.is-commanded,
    .eomaia-chat-bubble,
    #chatTitle::after {
        animation: none !important;
    }

    .btn.is-actuating,
    button.is-actuating,
    a.is-actuating,
    [role="button"].is-actuating,
    .eomaia-bar-item.is-actuating,
    .eomaia-nav-item.is-actuating,
    .eomaia-icon-control.is-actuating,
    .eomaia-material-action.is-actuating {
        transform: none;
    }
}
