/* 引入指定字体 */
@font-face {
    font-family: 'LXGW WenKai Lite';
    src: url('https://qi.ooeo.cn/fonts/LXGWWenKaiLite-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* 基础样式和变量定义 */
:root {
    --sky-blue: #B3D9E5;         /* 婴儿晴空蓝 */
    --sky-blue-light: #D9EAF2;   /* 浅晴空蓝 */
    --sky-blue-dark: #8EC5D8;    /* 深晴空蓝 */
    --sky-blue-deep: #5BA8BF;    /* 最深晴空蓝 */
    --white-elegant: #F9FBFD;    /* 素雅白 */
    --text-dark: #333333;        /* 深色文本 */
    --text-light: #666666;       /* 浅色文本 */
    --error-color: #e53e3e;      /* 错误提示红色 */
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05); /* 柔和阴影 */
    --shadow-medium: 0 6px 16px rgba(0, 0, 0, 0.08); /* 中等阴影 */
}

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

body {
    font-family: 'LXGW WenKai Lite', sans-serif;
    background-color: var(--white-elegant);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 工具类 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

.btn-primary {
    background-color: var(--sky-blue-deep);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-family: 'LXGW WenKai Lite', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: var(--sky-blue-dark);
    transform: scale(1.03);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: transparent;
    color: var(--sky-blue-deep);
    border: 2px solid var(--sky-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: 'LXGW WenKai Lite', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background-color: var(--sky-blue-light);
    transform: scale(1.03);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem; /* 左侧预留图标空间 */
    border: 2px solid var(--sky-blue);
    border-radius: 10px;
    font-family: 'LXGW WenKai Lite', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white; /* 确保输入框背景不透明 */
}

.input-field:focus {
    outline: none;
    border-color: var(--sky-blue-deep);
    box-shadow: 0 0 0 3px rgba(91, 168, 191, 0.2);
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sky-blue-deep);
    font-size: 1.25rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--sky-blue-deep);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.section-icon {
    margin-right: 0.75rem;
    color: var(--sky-blue-deep);
}

/* 头部样式 */
header {
    background-color: white;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 40;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

@media (min-width: 768px) {
    .header-content {
        flex-direction: row;
    }
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .logo {
        margin-bottom: 0;
    }
}

.logo-icon {
    font-size: 2rem;
    color: var(--sky-blue-deep);
    margin-right: 0.75rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--sky-blue-deep);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.welcome-message {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    transition: all 1s ease;
}

.ip-info {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.ip-info i {
    margin-right: 0.25rem;
    color: var(--sky-blue);
}

.logout-btn {
    margin-left: 1rem;
    color: var(--sky-blue-deep);
    background: none;
    border: none;
    font-family: 'LXGW WenKai Lite', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
}

.logout-btn i {
    margin-right: 0.25rem;
}

.logout-btn:hover {
    color: var(--sky-blue-dark);
}

/* 主内容区样式 */
main {
    flex-grow: 1;
    padding: 2rem 0;
}

.user-status {
    background-color: var(--sky-blue-light);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    transition: all 0.5s ease;
}

.user-status p {
    color: var(--sky-blue-deep);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-status i {
    margin-right: 0.5rem;
}

.section {
    margin-bottom: 3rem;
    transition: all 0.5s ease;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 1.25rem;
    border: 1px solid var(--sky-blue-light);
}

.card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-icon-container {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--sky-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.card-icon {
    font-size: 1.5rem;
    color: var(--sky-blue-deep);
}

.card-title {
    font-weight: bold;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.card-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* 页脚样式 */
footer {
    background-color: white;
    border-top: 1px solid var(--sky-blue-light);
    padding: 1.5rem 0;
}

.footer-content {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--sky-blue-deep);
}

.footer-links span {
    margin: 0 0.5rem;
}

/* 认证遮罩层和弹窗 */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* 确保登录框背景完全不透明 */
.auth-modal {
    background-color: var(--white-elegant);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    margin: 0 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--sky-blue-deep);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.auth-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--sky-blue);
    margin: 0.75rem auto 0;
    border-radius: 3px;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-error {
    background-color: rgba(229, 62, 62, 0.1);
    border-left: 4px solid var(--error-color);
    color: var(--error-color);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.95rem;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

/* 提示对话框 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    display: none;
}

/* 确保提示框背景完全不透明 */
.dialog-content {
    background-color: var(--white-elegant);
    border-radius: 16px;
    padding: 1.75rem;
    width: 100%;
    max-width: 400px;
    margin: 0 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.dialog-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--sky-blue-deep);
    margin-bottom: 1rem;
}

.dialog-message {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* 内置浏览器 */
.internal-browser {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 60;
    display: none;
    transition: opacity 0.3s ease;
}

.browser-container {
    background-color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.browser-header {
    background-color: var(--sky-blue-deep);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.browser-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.close-browser {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.close-browser:hover {
    color: var(--sky-blue-light);
}

.browser-frame-container {
    flex-grow: 1;
    overflow: hidden;
}

.browser-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* 动画效果 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

.border-error-color {
    border-color: var(--error-color) !important;
    animation: shake 0.5s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-info {
        align-items: flex-start;
        margin-top: 0.75rem;
        width: 100%;
    }
    
    .welcome-message {
        font-size: 1rem;
    }
    
    .auth-modal {
        padding: 2rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}
