/* Daydreamer - 梦境主题设计系统 */

/* ========== 全局变量 ========== */
:root {

    /* 主色与强调色 */

    --primary: #2f536f;

    --primary-dark: #233c52;

    --primary-light: #6b8da8;

    --accent: #c9a277;

    

    /* 背景色 */

    --bg-primary: #f7f4ef;

    --bg-secondary: #eef1f3;

    --bg-tertiary: #e6eaee;

    --bg-elevated: #fbfaf8;

    

    /* 文字颜色 */

    --text-primary: #1b2c3a;

    --text-secondary: #4e6070;

    --text-tertiary: #7b8b96;

    

    /* 边框与圆角 */

    --border-color: #d6dde3;

    --border-strong: #c7d0d8;

    --border-radius: 18px;

    --border-radius-sm: 12px;

    --border-radius-lg: 26px;

    

    /* 阴影 */

    --shadow-sm: 0 1px 2px rgba(19, 31, 44, 0.06);

    --shadow: 0 10px 24px rgba(19, 31, 44, 0.08);

    --shadow-lg: 0 18px 40px rgba(19, 31, 44, 0.12);

    --glow: 0 0 0 1px rgba(47, 83, 111, 0.08), 0 10px 30px rgba(47, 83, 111, 0.12);

    

    /* 动画 */

    --transition: all 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);

    --transition-fast: all 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);

}



/* ========== 重置样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

*:focus {
    outline: none;
}

body {
    font-family: 'Source Han Sans SC', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(60% 40% at 10% 10%, rgba(47, 83, 111, 0.08), transparent 55%),
        radial-gradient(50% 35% at 85% 15%, rgba(201, 162, 119, 0.10), transparent 60%),
        radial-gradient(70% 60% at 50% 80%, rgba(47, 83, 111, 0.05), transparent 65%);
    pointer-events: none;
    z-index: -1;
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', 'Cormorant Garamond', 'Noto Serif SC', serif;
    letter-spacing: 0.01em;
}

/* ========== 容器 ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }
}

/* ========== 卡片 ========== */
.card {
    background: var(--bg-elevated);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 45%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--glow);
    transform: translateY(-6px);
}

.card:hover::before {
    opacity: 0;
}

.api-profile-card {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.api-profile-details {
    min-width: 0;
}

.api-profile-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.api-profile-line {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.api-profile-line:last-child {
    margin-bottom: 0;
}

.api-profile-label {
    color: var(--text-tertiary);
}

.api-profile-value {
    color: var(--text-tertiary);
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.api-profile-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}


@media (max-width: 768px) {
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .api-profile-card {
        flex-direction: column;
        align-items: stretch;
    }

    .api-profile-actions {
        width: 100%;
        margin-top: 12px;
    }

    .api-profile-actions .btn {
        flex: 1 1 auto;
    }
}

/* Coupon config layout */
.coupon-rows {
    display: grid;
    gap: 12px;
}

.coupon-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.coupon-row {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr 0.6fr 0.4fr;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}

.coupon-row input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 0;
}

.coupon-enabled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .coupon-card {
        padding: 24px;
    }

    .coupon-actions {
        flex-direction: column;
    }

    .coupon-actions .btn {
        width: 100%;
    }

    .coupon-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "code percent"
            "expires expires"
            "enabled delete";
        align-items: stretch;
    }

    .coupon-code {
        grid-area: code;
    }

    .coupon-percent {
        grid-area: percent;
    }

    .coupon-expires {
        grid-area: expires;
    }

    .coupon-enabled {
        grid-area: enabled;
        justify-content: flex-start;
    }

    .coupon-delete {
        grid-area: delete;
        width: 100%;
    }
}

/* ========== 按钮系统 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:focus {
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: #fdfbf7;
    box-shadow: 0 12px 22px rgba(35, 60, 82, 0.18);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(35, 60, 82, 0.22);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 10px 18px rgba(35, 60, 82, 0.16);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 12px 22px rgba(239, 68, 68, 0.24);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(239, 68, 68, 0.28);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.22);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

@media (max-width: 768px) {
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ========== 输入框 ========== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47, 83, 111, 0.15);
}

textarea {
    resize: none;
    min-height: 120px;
    line-height: 1.6;
}

/* 聊天输入框特殊处理 */
#textInput {
    min-height: unset !important;
}

@media (max-width: 768px) {
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="url"],
    input[type="number"],
    textarea {
        font-size: 16px;
    }
}

/* ========== 表单组 ========== */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========== 导航项 ========== */
.nav-item {
    padding: 12px 20px;
    margin: 4px 8px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
    background: rgba(47, 83, 111, 0.08);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: #fdfbf7;
    font-weight: 500;
    box-shadow: 0 10px 20px rgba(35, 60, 82, 0.18);
}

@media (max-width: 768px) {
    .nav-item {
        padding: 14px 16px;
        font-size: 16px;
    }
}

/* ========== 章节项 ========== */
.chapter-item {
    padding: 16px;
    margin: 8px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.chapter-item:hover {
    border-color: var(--border-strong);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.chapter-item.selected {
    border-color: var(--primary);
    background: rgba(47, 83, 111, 0.08);
}

@media (max-width: 768px) {
    .chapter-item {
        padding: 14px;
        margin: 6px;
    }
    
    .chapter-item:hover {
        transform: none;
    }
}

/* ========== 角色卡片 ========== */
.character-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    transition: var(--transition);
}

.character-card.is-selected {
    border-color: var(--primary);
    background: rgba(47, 83, 111, 0.08);
}

.project-card.is-selected {
    border-color: var(--primary);
    background: rgba(47, 83, 111, 0.08);
}

.projects-grid .project-checkbox {
    display: none;
}

.projects-grid.edit-mode .project-checkbox {
    display: block;
}

.character-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.character-card h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 17px;
}

.character-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .character-card {
        padding: 16px;
    }
}

/* ========== 蓝图区块 ========== */
.blueprint-section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-elevated);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.blueprint-section h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .blueprint-section {
        padding: 20px;
        margin-bottom: 24px;
    }
}

/* ========== 徽章 ========== */
.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(201, 162, 119, 0.18);
    color: #6e5332;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(201, 162, 119, 0.35);
}

/* ========== 加载动画 ========== */
.loading {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(47, 83, 111, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn .loading {
    width: 16px;
    height: 16px;
    border-width: 2px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 提示信息 ========== */
.alert {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: var(--primary);
    color: white;
}

.alert-error {
    background: #ef4444;
    color: white;
}

.alert-info {
    background: var(--primary);
    color: white;
}

@media (max-width: 768px) {
    .alert {
        top: 16px;
        right: 16px;
        left: 16px;
        padding: 14px 20px;
        font-size: 13px;
    }
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========== 页面特定样式 ========== */

/* 首页 */
.home-hero {
    text-align: center;
    padding: 92px 20px;
    position: relative;
}

.home-hero h1 {
    font-size: 60px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.home-hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 52px;
}

.home-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.dream-btn {
    padding: 70px 56px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    min-width: 280px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.dream-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    display: none;
}

.dream-btn:hover {
    border-color: var(--border-strong);
    transform: translateY(-6px);
    box-shadow: 0 24px 45px rgba(35, 60, 82, 0.14);
}


.dream-btn:active {
    transform: translateY(-2px);
}

.home-page .home-hero h1 {
    animation: heroReveal 0.9s ease-out both;
}

.home-page .home-hero p {
    animation: heroReveal 0.9s ease-out 0.12s both;
}

.home-page .home-buttons {
    animation: heroReveal 0.9s ease-out 0.22s both;
}


.home-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.home-layout .container {
    flex: 1;
}

.home-footer {
    text-align: center;
    padding: 20px 16px 32px;
    color: var(--text-tertiary);
    font-size: 13px;
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .home-hero {
        padding: 64px 18px;
    }
    
    .home-hero h1 {
        font-size: 38px;
    }
    
    .home-hero p {
        font-size: 17px;
        margin-bottom: 36px;
    }
    
    .home-buttons {
        flex-direction: column;
        gap: 16px;
    }
    
    .dream-btn {
        padding: 52px 34px;
        font-size: 19px;
        min-width: 100%;
    }
    
    .dream-btn:hover {
        transform: none;
    }
}

/* 聊天界面 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 80vh;
    max-height: 800px;
    background: var(--bg-elevated);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-strong);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chat-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--bg-secondary);
}

.message {
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease-out;
    display: flex;  /* 添加 flex 布局，使 justifyContent 生效 */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-content {
    display: inline-block;
    padding: 14px 18px;
    border-radius: var(--border-radius-sm);
    max-width: 70%;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.6;
}

.message.ai .message-content {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.message.user {
    justify-content: flex-end;  /* 用户消息气泡靠右 */
}

.message.user .message-content {
    background: var(--primary);
    color: white;
    text-align: left;  /* 气泡内文本左对齐 */
}

/* 选项按钮 */
.option-btn {
    padding: 14px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--border-strong);
    background: rgba(47, 83, 111, 0.08);
    transform: translateY(-2px);
}

.option-btn:active:not(:disabled) {
    transform: translateY(0);
}

.option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.export-option input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: var(--transition-fast);
    flex-shrink: 0;
    outline: none;
    box-shadow: none;
}

.export-option input[type="radio"]::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    transform: scale(0);
    transition: var(--transition-fast);
}

.export-option input[type="radio"]:checked {
    border-color: var(--primary);
}

.export-option input[type="radio"]:checked::after {
    transform: scale(1);
}

.export-option-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.export-option-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.export-option.selected {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
}

.export-option:hover {
    border-color: var(--border-strong);
}

/* 输入区域 */
.chat-input {
    padding: 24px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input input,
.chat-input textarea {
    background: var(--bg-elevated);
}

@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 48px);
        border-radius: var(--border-radius);
    }
    
    .chat-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .chat-messages {
        padding: 20px;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 14px;
    }
    
    .option-btn:hover:not(:disabled) {
        transform: none;
    }
    
    .chat-input {
        padding: 16px;
    }
}

/* ========== 响应式布局 ========== */
@media (max-width: 768px) {
    /* 侧边栏导航 */
    .sidebar-nav {
        width: 100%;
        max-width: 280px;
    }
    
    /* 项目网格 */
    .projects-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 按钮组 */
    .button-group {
        flex-direction: column;
        width: 100%;
    }
    
    .button-group .btn {
        width: 100%;
    }
}

/* ========== 工具类 ========== */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

/* ========== 图标 ========== */
.icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-xl {
    width: 64px;
    height: 64px;
}

.icon-lg {
    width: 48px;
    height: 48px;
}

.icon-md {
    width: 44px;
    height: 44px;
}

.icon-sm {
    width: 32px;
    height: 32px;
}

.icon-muted {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.hero-icon {
    margin-bottom: 16px;
}

/* ========== 防止文本选择 ========== */
button,
.btn,
.nav-item,
.chapter-item,
.option-btn,
.dream-btn {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ========== 全屏加载动画 ========== */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#wifi-loader {
    --front-color: #2f536f;
    --back-color: #cfd7de;
    --text-color: #3b4c5a;
    width: 64px;
    height: 64px;
    border-radius: 50px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wifi-loader svg {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wifi-loader svg circle {
    position: absolute;
    fill: none;
    stroke-width: 6px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(-100deg);
    transform-origin: center;
}

#wifi-loader svg circle.back {
    stroke: var(--back-color);
}

#wifi-loader svg circle.front {
    stroke: var(--front-color);
}

#wifi-loader svg.circle-outer {
    height: 86px;
    width: 86px;
}

#wifi-loader svg.circle-outer circle {
    stroke-dasharray: 62.75 188.25;
}

#wifi-loader svg.circle-outer circle.back {
    animation: circle-outer135 1.8s ease infinite 0.3s;
}

#wifi-loader svg.circle-outer circle.front {
    animation: circle-outer135 1.8s ease infinite 0.15s;
}

#wifi-loader svg.circle-middle {
    height: 60px;
    width: 60px;
}

#wifi-loader svg.circle-middle circle {
    stroke-dasharray: 42.5 127.5;
}

#wifi-loader svg.circle-middle circle.back {
    animation: circle-middle6123 1.8s ease infinite 0.25s;
}

#wifi-loader svg.circle-middle circle.front {
    animation: circle-middle6123 1.8s ease infinite 0.1s;
}

#wifi-loader svg.circle-inner {
    height: 34px;
    width: 34px;
}

#wifi-loader svg.circle-inner circle {
    stroke-dasharray: 22 66;
}

#wifi-loader svg.circle-inner circle.back {
    animation: circle-inner162 1.8s ease infinite 0.2s;
}

#wifi-loader svg.circle-inner circle.front {
    animation: circle-inner162 1.8s ease infinite 0.05s;
}

#wifi-loader .text {
    position: absolute;
    bottom: -40px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: lowercase;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.2px;
}

#wifi-loader .text::before,
#wifi-loader .text::after {
    content: attr(data-text);
}

#wifi-loader .text::before {
    color: var(--text-color);
}

#wifi-loader .text::after {
    color: var(--front-color);
    animation: text-animation76 3.6s ease infinite;
    position: absolute;
    left: 0;
}

@keyframes circle-outer135 {
    0% { stroke-dashoffset: 25; }
    25% { stroke-dashoffset: 0; }
    65% { stroke-dashoffset: 301; }
    80% { stroke-dashoffset: 276; }
    100% { stroke-dashoffset: 276; }
}

@keyframes circle-middle6123 {
    0% { stroke-dashoffset: 17; }
    25% { stroke-dashoffset: 0; }
    65% { stroke-dashoffset: 204; }
    80% { stroke-dashoffset: 187; }
    100% { stroke-dashoffset: 187; }
}

@keyframes circle-inner162 {
    0% { stroke-dashoffset: 9; }
    25% { stroke-dashoffset: 0; }
    65% { stroke-dashoffset: 106; }
    80% { stroke-dashoffset: 97; }
    100% { stroke-dashoffset: 97; }
}

@keyframes text-animation76 {
    0% { clip-path: inset(0 100% 0 0); }
    50% { clip-path: inset(0); }
    100% { clip-path: inset(0 0 0 100%); }
}
