/* 基础样式 */
html {
    font-size: 25px;
}

rt {
    font-size: 0.6em;
}

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

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    color: #333;
    line-height: 1.6;
    
    /* 背景图设置 */
    background: url('https://free.picui.cn/free/2026/01/07/695db938004c2.png') no-repeat center center fixed;
    background-size: cover;
    
    /* 使用flex布局使内容居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* 状态卡片 */
.status-card {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 各种状态的颜色 */
.sleeping {
    color: gray;
}

.awake {
    color: rgb(16, 128, 0);
}

.error {
    color: red;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    justify-content: center;
}

.avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.user-details h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.last-update {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

/* 状态指示器 */
.status-display {
    margin-bottom: 25px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.pulse {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.pulse.online {
    background: #2ecc71;
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
}

.pulse.offline {
    background: #e74c3c;
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
}

.pulse.unknown {
    background: #f39c12;
    box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7);
}

.pulse.error {
    background: #c0392b;
    box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.7);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.status-text h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.status-text p {
    font-size: 14px;
    color: #7f8c8d;
}

/* 操作按钮 */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    flex: 1;
}

.repo-btn {
    background: #2c3e50;
    color: white;
}

.repo-btn:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.refresh-btn {
    background: #3498db;
    color: white;
}

.refresh-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

/* 留言板 */
.message-board {
    margin-bottom: 25px;
}

.toggle-btn {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.toggle-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.toggle-btn.expanded {
    background: #e3f2fd;
    border-color: #bbdefb;
    color: #1976d2;
}

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

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

.message-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.message-form.expanded {
    max-height: 800px;
    margin-bottom: 15px;
}

.messages-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.messages-list.expanded {
    max-height: 500px;
    overflow-y: auto;
}

/* 用户信息字段 */
.user-info-fields {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.user-info-field {
    flex: 1;
}

.user-info-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.user-info-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.user-info-field input:focus {
    border-color: #3498db;
    outline: none;
}

.user-info-field input::placeholder {
    color: #adb5bd;
}

/* 留言输入区域 */
.message-input-container {
    position: relative;
    margin-bottom: 15px;
}

.message-input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
    font-family: inherit;
}

.message-input:focus {
    border-color: #3498db;
    outline: none;
}

.message-input::placeholder {
    color: #adb5bd;
}

.message-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 3px;
}

/* 验证码容器 */
.captcha-container {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.captcha-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
}

.captcha-image-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.captcha-image-wrapper {
    position: relative;
    width: 180px;
    height: 80px;
    margin: 0 auto;
}

.captcha-image {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    border: 1px solid #ced4da;
    background: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.captcha-image:hover {
    transform: scale(1.02);
}

.refresh-captcha-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(52, 152, 219, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.refresh-captcha-btn:hover {
    background: rgba(41, 128, 185, 1);
}

.refresh-captcha-btn:active {
    transform: scale(0.95);
}

.captcha-input-wrapper {
    display: flex;
    flex-direction: column;
}

#captcha-answer {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
    text-align: center;
    font-weight: bold;
    letter-spacing: 2px;
}

#captcha-answer:focus {
    border-color: #3498db;
    outline: none;
}

.captcha-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
    font-style: italic;
}

.captcha-status {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    text-align: center;
}

.captcha-status.error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* 发送按钮 */
.send-btn {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 15px;
}

.send-btn:hover:not(:disabled) {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.send-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none !important;
}

.send-btn i {
    font-size: 14px;
}

/* 消息状态 */
.message-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.message-status.success {
    display: flex;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-status.error {
    display: flex;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 留言列表 */
.empty-message {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.message-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f3f4;
}

.message-user {
    color: #2c3e50;
    font-size: 12px;
}

.message-email {
    font-size: 12px;
    color: #7f8c8d;
}

.message-time {
    font-size: 12px;
    color: #95a5a6;
}

.message-content {
    color: #495057;
    line-height: 1.5;
    font-size: 14px;
}

.load-more-btn {
    width: 100%;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.load-more-btn:hover {
    background: #e9ecef;
}

/* 底部信息 */
.footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.more-info {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 15px;
}

.update-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6c757d;
}

#connection-status {
    font-size: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    html {
        font-size: 22px;
    }
    
    .status-card {
        padding: 30px;
        border-radius: 20px;
    }
    
    .user-info-fields {
        flex-direction: column;
        gap: 10px;
    }
    
    .captcha-image-wrapper {
        width: 150px;
        height: 70px;
    }
    
    #captcha-answer {
        font-size: 14px;
        padding: 8px;
    }
    
    .send-btn {
        padding: 10px 16px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 20px;
    }
    
    .status-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .user-details h1 {
        font-size: 20px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .captcha-image-wrapper {
        width: 130px;
        height: 60px;
    }
    
    .refresh-captcha-btn {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .send-btn {
        padding: 8px 14px;
        font-size: 14px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}