/* 交流QQ：2070971599 */
/* GITHUb开源地址：https://github.com/BaiC-C/Baicc.top */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f6f8fa;
    color: #24292f;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.5;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(208, 215, 222, 0.8) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(208, 215, 222, 0.8) 0%, transparent 20%);
    overflow-x: hidden;
    position: relative;
}

/* 弹幕区域 */
.danmu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: visible;
    pointer-events: none;
    z-index: 10;
}

.danmu-track {
    position: absolute;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.danmu-row {
    flex: 1;
    position: relative;
    height: 50px;
    margin: 5px 0;
    overflow: visible;
}

.danmu-bubble {
    position: absolute;
    right: -300px;
    background-color: rgba(255, 255, 255, 0.9);
    /* 提高不透明度确保可见 */
    border-radius: 25px;
    padding: 8px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
    /* 提高默认不透明度 */
    transition: opacity 0.3s, transform 0.3s;
    border: 1px solid rgba(208, 215, 222, 0.5);
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    white-space: nowrap;
    font-size: 0.9rem;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    /* 确保弹幕在所有层之上 */
    z-index: 1000;
}

.danmu-bubble:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.danmu-author {
    font-weight: 600;
    color: #238636;
    display: flex;
    align-items: center;
    gap: 5px;
}

.danmu-content {
    color: #24292f;
}

.danmu-time {
    font-size: 0.75rem;
    color: #6e7781;
    margin-left: 5px;
}

/* 弹幕动画  */
@keyframes danmuScroll {
    0% {
        right: -300px;
        opacity: 0.9;
        transform: translateX(0);
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        right: calc(100vw + 300px);
        /* 完全移出屏幕 */
        opacity: 0.3;
        transform: translateX(0);
    }
}

.danmu-container::before {
    display: none;
    /* 移除左侧遮罩 */
}

.danmu-container::after {
    display: none;
    /* 移除右侧遮罩 */
}

/* 侧边栏 */
.danmu-sidebar {
    position: fixed;
    top: 50%;
    right: -300px;
    /* 初始位置完全在屏幕外 */
    transform: translateY(-50%);
    z-index: 1000;
    transition: right 0.3s ease;
    /* 改为 right 属性动画 */
    display: flex;
    align-items: center;
}

.danmu-sidebar.expanded {
    right: 0;
    /* 紧贴右侧边缘 */
}

.sidebar-toggle {
    position: relative;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-right: none;
    border-radius: 20px 0 0 20px;
    width: 40px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #24292f;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    margin-left: -40px;
    /* 确保紧贴内容区域 */
}

.sidebar-toggle:hover {
    background-color: #f6f8fa;
    width: 45px;
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-content {
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-right: none;
    border-radius: 15px 0 0 15px;
    padding: 25px;
    width: 300px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    /* 使用父容器的 right 属性控制 */
}

.danmu-sidebar.expanded .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #d0d7de;
}

.sidebar-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #24292f;
    margin: 0;
}

.sidebar-header i {
    color: #238686;
    font-size: 1.4rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #57606a;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #f6f8fa;
}

.form-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
    background-color: #ffffff;
}

.form-input::placeholder {
    color: #8b949e;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.color-options {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #24292f;
    box-shadow: 0 0 0 2px rgba(36, 41, 47, 0.2);
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: #238686;
    color: white;
}

.btn-primary:hover {
    background-color: #238686;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 127, 134, 0.3);
}

.btn-secondary {
    background-color: #f6f8fa;
    color: #24292f;
    border: 1px solid #d0d7de;
}

.btn-secondary:hover {
    background-color: #eaeef2;
    transform: translateY(-2px);
}

.danmu-preview {
    margin-top: 15px;
    padding: 10px;
    background-color: #f6f8fa;
    border-radius: 8px;
    border: 1px dashed #d0d7de;
    font-size: 0.85rem;
    color: #57606a;
    text-align: center;
}

/* 暗色主题下的弹幕样式 */
body.dark-theme .danmu-bubble {
    background-color: rgba(33, 38, 45, 0.9);
    border-color: rgba(48, 54, 61, 0.5);
}

body.dark-theme .danmu-content {
    color: #c9d1d9;
}

/* 暗色主题下的侧边栏样式 */
body.dark-theme .sidebar-toggle {
    background-color: #21262d;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-theme .sidebar-toggle:hover {
    background-color: #30363d;
}

body.dark-theme .sidebar-content {
    background-color: #21262d;
    border-color: #30363d;
}

body.dark-theme .sidebar-header {
    border-bottom-color: #30363d;
}

body.dark-theme .sidebar-header h3 {
    color: #c9d1d9;
}

body.dark-theme .form-group label {
    color: #8b949e;
}

body.dark-theme .form-input {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-theme .form-input:focus {
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
    background-color: #161b22;
}

body.dark-theme .form-input::placeholder {
    color: #6e7681;
}

body.dark-theme .danmu-preview {
    background-color: #161b22;
    border-color: #30363d;
    color: #8b949e;
}

body.dark-theme .btn-secondary {
    background-color: #30363d;
    border-color: #3d444d;
    color: #c9d1d9;
}

body.dark-theme .btn-secondary:hover {
    background-color: #3d444d;
}

body.dark-theme .color-option.selected {
    border-color: #c9d1d9;
    box-shadow: 0 0 0 2px rgba(201, 209, 217, 0.2);
}

.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 20;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 30px;
    background: linear-gradient(45deg, #238636, #2ea043);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(35, 134, 54, 0.3);
    overflow: hidden;
    border: 3px solid #d0d7de;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(35, 134, 111, 0.5);
}

.profile-pic i {
    font-size: 50px;
    color: #fff;
}

h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #58a6ff, #238636);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 1.2rem;
    color: #57606a;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* 下班倒计时样式 */
.countdown-container {
    margin-bottom: 40px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid #d0d7de;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.countdown-title {
    font-size: 1.1rem;
    color: #57606a;
    margin-bottom: 10px;
    font-weight: 500;
}

.countdown {
    font-size: 2.2rem;
    font-weight: 700;
    color: #238636;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.countdown-message {
    font-size: 1rem;
    color: #6e7781;
    font-style: italic;
}

.countdown.off-work {
    color: #f9826c;
}

.countdown-message.off-work {
    color: #f9826c;
    font-weight: 500;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    color: #24292f;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    min-width: 180px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.link-btn:hover {
    background-color: #f6f8fa;
    border-color: #58a6ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.link-btn.github:hover {
    border-color: #238636;
    color: #238636;
}

.link-btn.twitter:hover {
    border-color: #1da1f2;
    color: #1da1f2;
}

.link-btn.linkedin:hover {
    border-color: #c6bd7cff;
    color: #c6bd7cff;
}

.link-btn.blog:hover {
    border-color: #f9826c;
    color: #f9826c;
}

.link-btn i {
    font-size: 1.2rem;
}

.copyright {
    margin-top: 45px;
    color: #6e7781;
    font-size: 0.9rem;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .danmu-container {
        display: none;
    }

    .danmu-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .countdown {
        font-size: 1.9rem;
    }

    .links-container {
        gap: 15px;
    }

    .link-btn {
        min-width: 160px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .countdown {
        font-size: 1.6rem;
    }

    .profile-pic {
        width: 100px;
        height: 100px;
    }

    .links-container {
        flex-direction: column;
        align-items: center;
    }

    .link-btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 900px) {
    .danmu-toggle {
        display: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container>* {
    animation: fadeIn 0.8s ease forwards;
}

.profile-pic {
    animation-delay: 0.1s;
    opacity: 0;
}

h1 {
    animation-delay: 0.3s;
    opacity: 0;
}

.tagline {
    animation-delay: 0.5s;
    opacity: 0;
}

.countdown-container {
    animation-delay: 0.6s;
    opacity: 0;
}

.links-container {
    animation-delay: 0.7s;
    opacity: 0;
}

.copyright {
    animation-delay: 0.9s;
    opacity: 0;
}

/* 主题切换开关 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #24292f;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 100;
}

.theme-toggle:hover {
    background-color: #f6f8fa;
    transform: rotate(30deg);
}

body.dark-theme {
    background-color: #0d1117;
    color: #c9d1d9;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(33, 38, 45, 0.8) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(33, 38, 45, 0.8) 0%, transparent 20%);
}

body.dark-theme .tagline {
    color: #8b949e;
}

body.dark-theme .countdown-container {
    background-color: rgba(33, 38, 45, 0.7);
    border-color: #30363d;
}

body.dark-theme .countdown-title {
    color: #8b949e;
}

body.dark-theme .link-btn {
    background-color: #21262d;
    border-color: #30363d;
    color: #c9d1d9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-theme .link-btn:hover {
    background-color: #30363d;
}

body.dark-theme .profile-pic {
    border-color: #30363d;
}

body.dark-theme .theme-toggle {
    background-color: #21262d;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-theme .copyright {
    color: #6e7681;
}

/* 弹幕开关 */
.danmu-toggle {
    position: fixed;
    top: 20px;
    right: 85px;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #24292f;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 100;
}

.danmu-toggle:hover {
    background-color: #f6f8fa;
    transform: scale(1.1);
}

.danmu-toggle.disabled {
    opacity: 0.5;
    background-color: #f6f8fa;
}

.danmu-toggle.disabled:hover {
    transform: scale(1);
}

body.dark-theme .danmu-toggle {
    background-color: #21262d;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-theme .danmu-toggle:hover {
    background-color: #30363d;
}

body.dark-theme .danmu-toggle.disabled {
    opacity: 0.5;
    background-color: #30363d;
}

/* 网站管理下拉菜单 */
.site-manager {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.manager-toggle {
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #24292f;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.manager-toggle:hover {
    background-color: #f6f8fa;
    transform: rotate(15deg);
}

.manager-dropdown {
    position: absolute;
    top: 60px;
    left: 0;
    width: 280px;
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 101;
}

.site-manager.active .manager-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #d0d7de;
}

.dropdown-header i {
    color: #238686;
    font-size: 1.4rem;
}

.dropdown-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #24292f;
    margin: 0;
}

.site-list {
    padding: 15px 0;
    max-height: 400px;
    overflow-y: auto;
}

.site-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.site-item:hover {
    background-color: #f6f8fa;
}

.site-icon {
    width: 40px;
    height: 40px;
    background-color: #f6f8fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #238686;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.site-item:hover .site-icon {
    background-color: #238686;
    color: white;
    transform: scale(1.1);
}

.site-info {
    flex: 1;
}

.site-name {
    font-weight: 600;
    color: #24292f;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.site-url {
    color: #6e7781;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

/* 暗色主题下的菜单样式 */
body.dark-theme .manager-toggle {
    background-color: #21262d;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-theme .manager-toggle:hover {
    background-color: #30363d;
}

body.dark-theme .manager-dropdown {
    background-color: #21262d;
    border-color: #30363d;
}

body.dark-theme .dropdown-header {
    border-bottom-color: #30363d;
}

body.dark-theme .dropdown-header h3 {
    color: #c9d1d9;
}

body.dark-theme .site-item:hover {
    background-color: #30363d;
}

body.dark-theme .site-icon {
    background-color: #30363d;
    color: #58a6ff;
}

body.dark-theme .site-name {
    color: #c9d1d9;
}

body.dark-theme .site-url {
    color: #8b949e;
}

body.dark-theme .site-item:hover .site-icon {
    background-color: #238686;
    color: white;
}


/* 响应式调整 */
@media (max-width: 768px) {
    .manager-dropdown {
        width: 260px;
        left: -105px;
    }

    .manager-dropdown::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #ffffff;
    }

    body.dark-theme .manager-dropdown::before {
        border-bottom-color: #21262d;
    }
}

@media (max-width: 480px) {
    .site-manager {
        top: 15px;
        left: 15px;
    }

    .manager-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}