* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'font';
    src: url('fonts/spec.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'font1';
    src: url('fonts/spec1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #c0efff;
    font-family: 'font1', sans-serif;

    background: linear-gradient(
            -45deg,
            #060a14,
            #0f172a,
            #0a1220,
            #1b2740,
            #0d1424,
            #1e2f4a
    );
    background-size: 400% 400%;
    animation: gradientMove 22s ease infinite;
}

.stars {
    position: fixed;
    inset: 0;

    background-image:
            radial-gradient(2px 2px at 20px 30px, white, transparent),
            radial-gradient(2px 2px at 40px 70px, white, transparent),
            radial-gradient(1px 1px at 90px 40px, white, transparent),
            radial-gradient(2px 2px at 160px 120px, white, transparent),
            radial-gradient(1px 1px at 200px 80px, white, transparent);

    background-size: 300px 300px;
    opacity: 0.25;
    z-index: -2;

    animation: starsMove 60s linear infinite;
}

@keyframes starsMove {
    from { background-position: 0 0; }
    to { background-position: -1000px 1000px; }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hidden {
    display: none !important;
}

.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 149, 255, 0.2) 0%, rgba(0, 149, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

.cursor-glow.active {
    width: 150px;
    height: 150px;
    opacity: 0.8;
}

.content-wrapper {
    position: relative;
    z-index: 1;
    margin: 60px auto 40px;
    padding: 0 20px;
    max-width: 32rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.brand-name {
    margin: 0;
    font-family: 'font', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #e6faff;
}

.brand-dot {
    color: #87fbea;
}

.brand-sub {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: rgba(192, 239, 255, 0.55);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#timer-container {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem 1.1rem;
    margin-bottom: 1.5rem;
    border-radius: 16px;
}

.timer-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(192, 239, 255, 0.5);
}

#countdown {
    font-family: 'font', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #87fbea;
    letter-spacing: 0.05em;
}

#address-selector {
    width: 100%;
    display: grid;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.addr-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;

    padding: 1rem 1.25rem;
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

    cursor: pointer;
    text-align: left;
    color: #c0efff;
    font-family: inherit;

    transition: 0.3s ease;
}

.addr-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(135, 251, 234, 0.35);
    transform: translateY(-2px);
}

.addr-index {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(135, 251, 234, 0.12);
    color: #87fbea;
    font-size: 12px;
    font-weight: 700;
}

.addr-main {
    flex: 1;
    min-width: 0;
}

.addr-email {
    font-family: 'font', sans-serif;
    font-size: 0.9rem;
    color: #e6faff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.addr-meta {
    margin-top: 3px;
    font-size: 11px;
    color: rgba(192, 239, 255, 0.45);
}

.addr-arrow {
    flex-shrink: 0;
    opacity: 0.45;
    color: #c0efff;
}

#mail-viewer {
    width: 100%;
}

#mail-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

#current-address {
    margin: 0;
    font-family: 'font', sans-serif;
    font-size: 1.05rem;
    color: #e6faff;
    word-break: break-all;
}

.btn {
    font-family: inherit;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-primary {
    padding: 0.6rem 1.3rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    background: #87fbea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(135, 251, 234, 0.4);
}

.btn-danger {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;

    color: #ffb4b4;
    background: rgba(255, 90, 90, 0.08);
    border: 1px solid rgba(255, 120, 120, 0.25);
}

.btn-danger:hover {
    background: rgba(255, 90, 90, 0.18);
    border-color: rgba(255, 120, 120, 0.45);
}

.back-btn {
    margin-top: 1.75rem;
    padding: 0;
    background: none;
    border: none;
    color: rgba(192, 239, 255, 0.5);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.back-btn:hover {
    color: #c0efff;
}

#email-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mail-card {
    padding: 1.25rem;
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);

    transition: 0.3s ease;
}

.mail-card:hover {
    border-color: rgba(135, 251, 234, 0.3);
    transform: translateY(-2px);
}

.mail-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.mail-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(135, 251, 234, 0.14);
    color: #87fbea;
    font-size: 13px;
    font-weight: 700;
}

.mail-from {
    font-family: 'font', sans-serif;
    font-size: 11.5px;
    color: #87fbea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-subject {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e6faff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-time {
    flex-shrink: 0;
    padding-top: 2px;
    font-size: 11px;
    color: rgba(192, 239, 255, 0.4);
    white-space: nowrap;
}

.mail-divider {
    height: 1px;
    margin-bottom: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
}

.mail-body {
    padding: 1rem;
    border-radius: 14px;
    max-height: 260px;
    overflow-y: auto;

    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);

    font-size: 0.88rem;
    color: #d6f4ff;
    line-height: 1.7;
}

.mail-body-html {
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

.mail-iframe {
    display: block;
    width: 100%;
    height: 260px;
    border: none;
    background: #ffffff;
}

.state-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 3.5rem 1rem;
}

.state-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(135, 251, 234, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.state-title {
    margin: 0;
    color: rgba(192, 239, 255, 0.65);
    font-size: 0.9rem;
}

.state-sub {
    margin: 4px 0 0;
    color: rgba(192, 239, 255, 0.35);
    font-size: 0.78rem;
}

.state-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 18px;

    background: rgba(255, 90, 90, 0.06);
    border: 1px solid rgba(255, 120, 120, 0.2);
}

.state-error span {
    font-size: 0.85rem;
    color: #ffb4b4;
}

.dot-row {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.dot-row span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #87fbea;
    animation: dot-bounce 1.4s ease-in-out infinite;
}

.dot-row span:nth-child(2) { animation-delay: 0.2s; }
.dot-row span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-6px); opacity: 1; }
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9fe870;
    box-shadow: 0 0 10px #9fe870;
}

footer {
    position: relative;
    z-index: 1;
    padding: 0 20px 2.5rem;
}

.footer-inner {
    max-width: 32rem;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.support-link {
    display: inline-block;
    text-decoration: none;
    color: #0f172a;
    background: #87fbea;
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    transition: 0.3s ease;
}

.support-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(135, 251, 234, 0.4);
}

.credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;

    font-family: 'font', sans-serif;
    font-size: 10.5px;
    color: rgba(192, 239, 255, 0.35);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.credit-sep {
    opacity: 0.4;
}

.credit a {
    color: rgba(192, 239, 255, 0.35);
    text-decoration: none;
    border-bottom: 1px dotted rgba(192, 239, 255, 0.35);
}

.policy-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(192, 239, 255, 0.35);
    text-decoration: underline dotted;
    cursor: pointer;
}

.policy-link:hover {
    color: #87fbea;
}

.admin-trigger {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 40;
    opacity: 0.15;
    transition: opacity 0.2s ease;
}

.admin-trigger:hover {
    opacity: 0.5;
}

#admin-panel {
    position: fixed;
    bottom: 36px;
    right: 16px;
    width: 16rem;
    padding: 1.1rem;
    border-radius: 20px;
    z-index: 45;

    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.admin-label {
    margin: 0 0 0.65rem;
    text-align: center;
    font-size: 10px;
    color: rgba(192, 239, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.admin-input {
    width: 100%;
    margin-bottom: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);

    font-family: inherit;
    font-size: 0.9rem;
    color: #e6faff;
    outline: none;

    transition: border-color 0.3s ease;
}

.admin-input:focus {
    border-color: #87fbea;
}

#role-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.9rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
}

.admin-field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 10px;
    color: rgba(192, 239, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-create-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.admin-create-row .admin-input {
    margin-bottom: 0;
}

.btn-add {
    padding: 0 0.9rem;
    border-radius: 12px;
    border: none;
    background: #87fbea;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(135, 251, 234, 0.4);
}

.btn-logout {
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    color: rgba(192, 239, 255, 0.4);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-logout:hover {
    color: #c0efff;
}

#duchat-toast, #copy-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 0.65rem 1.2rem;
    border-radius: 999px;

    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;

    z-index: 9999;
    pointer-events: none;
    opacity: 0;

    transform: translateX(-50%) translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(14px);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    background: rgba(6, 11, 20, 0.7);
    backdrop-filter: blur(6px);
}

.modal-box {
    width: 100%;
    max-width: 30rem;
    max-height: 85vh;

    display: flex;
    flex-direction: column;

    padding: 1.75rem;
    border-radius: 24px;

    background: rgba(20, 28, 46, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-title {
    margin: 0;
    font-family: 'font', sans-serif;
    font-size: 1.3rem;
    color: #e6faff;
}

.modal-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #c0efff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #87fbea;
}

.modal-body {
    overflow-y: auto;
    margin-bottom: 1.25rem;
    padding-right: 4px;

    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(214, 244, 255, 0.75);
}

.modal-body h2 {
    font-size: 1rem;
    color: #c0efff;
    margin: 1.1rem 0 0.4rem;
}

.modal-body h2:first-child {
    margin-top: 0;
}

.modal-body p {
    margin: 0 0 0.6rem;
}

.modal-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-consent input {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #87fbea;
    cursor: pointer;
    flex-shrink: 0;
}

.modal-consent label {
    font-size: 0.85rem;
    color: #c0efff;
    cursor: pointer;
}

.modal-accept {
    width: 100%;
    padding: 0.75rem;
    border-radius: 14px;
    border: none;

    background: #87fbea;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;

    opacity: 0.4;
    pointer-events: none;
    transition: 0.3s ease;
}

.modal-accept.enabled {
    opacity: 1;
    pointer-events: auto;
}

.modal-accept.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(135, 251, 234, 0.4);
}

@media (max-width: 1100px) {
    #admin-panel { right: 12px; }
}

@media (max-width: 480px) {
    .content-wrapper { margin-top: 40px; }
    .brand-name { font-size: 1.9rem; }
    #admin-panel { width: calc(100% - 32px); right: 16px; }
    .modal-box { padding: 1.35rem; }
}