/* 
 * 宠物乐园 - 主样式
 * 版本: V1.0.0
 */

/* ===== 全局重置 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 隐藏所有滚动条 - 全浏览器兼容 */
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

*::-webkit-scrollbar-track {
    display: none !important;
}

*::-webkit-scrollbar-thumb {
    display: none !important;
}

/* 禁止文本选择和浏览器原生组件 */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* 禁止右键菜单 */
body {
    -webkit-context-menu: none;
}

/* ===== 链接 ===== */
a {
    color: #4fc3f7;
    text-decoration: none;
    transition: color 0.3s;
}
a:hover {
    color: #81d4fa;
}

/* ===== 页面容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 顶部导航 ===== */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid #0f3460;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: bold;
    color: #e94560;
    text-decoration: none;
}

.logo svg {
    width: 36px;
    height: 36px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav a {
    padding: 8px 16px;
    border-radius: 6px;
    color: #ccc;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
}

.nav a:hover,
.nav a.active {
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
}

.nav .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 15px;
    border-left: 1px solid #333;
}

.nav .username {
    color: #ffd700;
    font-size: 14px;
}

/* ===== 公告条 ===== */
.announcement-bar {
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    color: #fff;
    text-align: center;
    padding: 6px 20px;
    font-size: 13px;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    animation: pulse-announcement 2s infinite;
}

@keyframes pulse-announcement {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* ===== 主内容 ===== */
.main-content {
    padding-top: 70px;
    min-height: calc(100vh - 60px);
}

/* ===== 页脚 ===== */
.footer {
    background: #111;
    border-top: 1px solid #222;
    padding: 30px 0;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.footer a {
    color: #888;
}

.footer a:hover {
    color: #e94560;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #e94560, #c73650);
    color: #fff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #ff5a77, #d94560);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-secondary {
    background: #2a2a4a;
    color: #ccc;
    border: 1px solid #444;
}
.btn-secondary:hover {
    background: #3a3a5a;
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
}
.btn-success:hover {
    background: linear-gradient(135deg, #3ddc84, #2ecc71);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #ff5e4d, #e74c3c);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
}
.btn-warning:hover {
    background: linear-gradient(135deg, #f5b041, #f39c12);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 卡片 ===== */
.card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.card-header {
    font-size: 16px;
    font-weight: bold;
    color: #e94560;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #0f3460;
}

/* ===== 品质颜色 ===== */
.q-1 { color: #cccccc; }
.q-2 { color: #1eff00; }
.q-3 { color: #0070dd; }
.q-4 { color: #a335ee; }
.q-5 { color: #ff8000; }

.q-bg-1 { background: #2a2a2a; border-color: #444; }
.q-bg-2 { background: #1a3a1a; border-color: #1eff00; }
.q-bg-3 { background: #1a1a3a; border-color: #0070dd; }
.q-bg-4 { background: #2a1a3a; border-color: #a335ee; }
.q-bg-5 { background: #3a2a1a; border-color: #ff8000; }

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: #aaa;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.2);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

/* ===== 提示 ===== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #1a3a1a; color: #4caf50; border: 1px solid #2e7d32; }
.alert-error { background: #3a1a1a; color: #e74c3c; border: 1px solid #c0392b; }
.alert-warning { background: #3a2a1a; color: #f39c12; border: 1px solid #e67e22; }
.alert-info { background: #1a2a3a; color: #4fc3f7; border: 1px solid #0288d1; }

/* ===== 弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.modal-title {
    font-size: 18px;
    color: #e94560;
    margin-bottom: 16px;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
}
.modal-close:hover { color: #e94560; }

/* ===== 加载动画 ===== */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #333;
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}
.page-btn {
    padding: 8px 16px;
    background: #2a2a4a;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 14px;
}
.page-btn:hover {
    background: #3a3a5a;
    color: #fff;
}
.page-info {
    color: #888;
    font-size: 14px;
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-gold { color: #ffd700; }
.text-danger { color: #e74c3c; }
.text-success { color: #4caf50; }
.text-info { color: #4fc3f7; }
.text-muted { color: #666; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}
