/* 拟态风格 - PHP加密系统 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --error-color: #f56565;
    --warning-color: #ed8936;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #e0e5ec;
    --card-bg: #e0e5ec;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* 布局容器 */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 左侧侧边栏 */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #e0e5ec 0%, #d5dae6 100%);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.sidebar-header {
    padding: 30px 20px 25px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    background: var(--bg-color);
}

.sidebar-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 6px 6px 12px var(--shadow-dark),
                -6px -6px 12px var(--shadow-light);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.sidebar-logo:hover {
    transform: translateY(-2px);
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
    color: var(--secondary-color);
}

.sidebar-menu {
    flex: 1;
    padding: 25px 15px;
    overflow-y: auto;
}

.sidebar-divider {
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 20px 15px 10px;
    margin-top: 5px;
    position: relative;
    opacity: 0.8;
}

.sidebar-divider:first-child {
    margin-top: 0;
}

.sidebar-divider::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    opacity: 0.3;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 13px 15px;
    margin: 6px 0;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
    transition: width 0.3s ease;
}

.sidebar-item:hover {
    background: var(--card-bg);
    box-shadow: 5px 5px 10px var(--shadow-dark),
                -5px -5px 10px var(--shadow-light);
    transform: translateX(5px);
    color: var(--primary-color);
}

.sidebar-item:hover::before {
    width: 4px;
}

.sidebar-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 5px 5px 15px rgba(102, 126, 234, 0.4),
                -2px -2px 8px rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.sidebar-item.active::before {
    width: 4px;
    background: white;
}

.sidebar-item.active .sidebar-icon {
    filter: brightness(1.3) drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
    transform: scale(1.1);
}

.sidebar-icon {
    font-size: 1.4rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-text {
    font-size: 0.95rem;
    font-weight: inherit;
    letter-spacing: 0.3px;
    position: relative;
}

.badge-count {
    display: inline-block;
    background: #f56565;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.sidebar-footer {
    padding: 20px 15px;
    border-top: 2px solid rgba(102, 126, 234, 0.1);
    background: var(--bg-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark),
                inset -4px -4px 8px var(--shadow-light);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.sidebar-user:hover {
    box-shadow: inset 5px 5px 10px var(--shadow-dark),
                inset -5px -5px 10px var(--shadow-light);
}

.user-avatar {
    font-size: 2.2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    box-shadow: 4px 4px 8px var(--shadow-dark),
                -4px -4px 8px var(--shadow-light);
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--error-color);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 4px 4px 8px var(--shadow-dark),
                -4px -4px 8px var(--shadow-light);
    transition: all 0.3s ease;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-logout:hover {
    box-shadow: inset 4px 4px 8px var(--shadow-dark),
                inset -4px -4px 8px var(--shadow-light);
    color: #e53e3e;
    transform: translateY(-1px);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 20px;
}

/* 拟态阴影效果 */
.neumorphic {
    background: var(--card-bg);
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
    border-radius: 20px;
}

.neumorphic-inset {
    background: var(--card-bg);
    box-shadow: inset 6px 6px 12px var(--shadow-dark),
                inset -6px -6px 12px var(--shadow-light);
    border-radius: 15px;
}

/* 头部导航 */
.site-header {
    background: var(--bg-color);
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 20px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 6px 6px 12px var(--shadow-dark),
                -6px -6px 12px var(--shadow-light);
}

.nav-menu {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-item {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-item:hover, .nav-item.active {
    background: var(--card-bg);
    box-shadow: 6px 6px 12px var(--shadow-dark),
                -6px -6px 12px var(--shadow-light);
    color: var(--primary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    color: var(--text-color);
    font-weight: 500;
}

.logout-btn {
    padding: 8px 16px;
    background: var(--card-bg);
    color: var(--error-color);
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 4px 4px 8px var(--shadow-dark),
                -4px -4px 8px var(--shadow-light);
    transition: all 0.3s ease;
}

.logout-btn:hover {
    box-shadow: inset 4px 4px 8px var(--shadow-dark),
                inset -4px -4px 8px var(--shadow-light);
}

/* 页脚 */
.site-footer {
    background: var(--bg-color);
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer p {
    margin: 5px 0;
}

/* 欢迎页面 */
.welcome-box {
    max-width: 900px;
    margin: 50px auto;
    padding: 50px;
    background: var(--card-bg);
    box-shadow: 12px 12px 24px var(--shadow-dark),
                -12px -12px 24px var(--shadow-light);
    border-radius: 30px;
    text-align: center;
}

.welcome-box .logo {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: inline-block;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-item {
    padding: 30px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    background: var(--card-bg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 6px 6px 12px var(--shadow-dark),
                -6px -6px 12px var(--shadow-light);
}

.btn-primary:hover {
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--primary-color);
    box-shadow: 6px 6px 12px var(--shadow-dark),
                -6px -6px 12px var(--shadow-light);
}

.btn-secondary:hover {
    box-shadow: inset 6px 6px 12px var(--shadow-dark),
                inset -6px -6px 12px var(--shadow-light);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

/* 表单样式 */
.auth-box {
    max-width: 450px;
    margin: 50px auto;
    padding: 40px;
    background: var(--card-bg);
    box-shadow: 12px 12px 24px var(--shadow-dark),
                -12px -12px 24px var(--shadow-light);
    border-radius: 25px;
}

.auth-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border: none;
    background: var(--card-bg);
    box-shadow: inset 6px 6px 12px var(--shadow-dark),
                inset -6px -6px 12px var(--shadow-light);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    box-shadow: inset 4px 4px 8px var(--shadow-dark),
                inset -4px -4px 8px var(--shadow-light);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 提示消息 */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.alert-success {
    background: var(--success-color);
    color: white;
    box-shadow: 4px 4px 8px rgba(72, 187, 120, 0.3);
}

.alert-error {
    background: var(--error-color);
    color: white;
    box-shadow: 4px 4px 8px rgba(245, 101, 101, 0.3);
}

/* 仪表板 */
.dashboard {
    padding: 0;
    width: 100%;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card.vip-active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-extra {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* 快速操作 */
.quick-actions {
    width: 100%;
}

.quick-actions h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.action-card {
    display: block;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 10px 10px 20px var(--shadow-dark),
                -10px -10px 20px var(--shadow-light);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.action-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.action-desc {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 页面内容 */
.page-content {
    max-width: 900px;
    margin: 0 auto;
}

.encrypt-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 12px 12px 24px var(--shadow-dark),
                -12px -12px 24px var(--shadow-light);
}

.info-panel {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark),
                inset -4px -4px 8px var(--shadow-light);
}

.info-panel h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-panel ul {
    list-style: none;
    padding-left: 0;
}

.info-panel li {
    padding: 8px 0;
    color: var(--text-color);
    position: relative;
    padding-left: 25px;
}

.info-panel li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* 文件上传 */
.upload-form {
    margin-top: 30px;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: inset 6px 6px 12px var(--shadow-dark),
                inset -6px -6px 12px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.file-label:hover {
    box-shadow: inset 8px 8px 16px var(--shadow-dark),
                inset -8px -8px 16px var(--shadow-light);
}

.file-icon {
    font-size: 2.5rem;
}

.file-text {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.file-name {
    text-align: center;
    color: var(--success-color);
    margin-top: -10px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* 文本加密 */
.text-encrypt-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.text-panel {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
}

.text-panel h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.text-area {
    width: 100%;
    padding: 15px;
    border: none;
    background: var(--card-bg);
    box-shadow: inset 6px 6px 12px var(--shadow-dark),
                inset -6px -6px 12px var(--shadow-light);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    resize: vertical;
    margin-bottom: 15px;
}

.text-area:focus {
    outline: none;
}

.result-panel {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
    margin-top: 20px;
}

.result-panel h3 {
    color: var(--success-color);
    margin-bottom: 20px;
}

.result-text {
    background: var(--card-bg);
    margin-bottom: 15px;
}

/* 充值页面 */
.recharge-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .recharge-container {
        grid-template-columns: 1fr;
    }
}

.recharge-box, .records-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark),
                -8px -8px 16px var(--shadow-light);
}

.recharge-box h3, .records-box h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card-types, .test-cards {
    margin-top: 25px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark),
                inset -4px -4px 8px var(--shadow-light);
}

.card-types h4, .test-cards h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1rem;
}

.card-types ul, .test-cards ul {
    list-style: none;
    padding-left: 0;
}

.card-types li, .test-cards li {
    padding: 8px 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

.test-cards code {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.no-data {
    text-align: center;
    color: var(--text-light);
    padding: 30px;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.record-item {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 4px 4px 8px var(--shadow-dark),
                -4px -4px 8px var(--shadow-light);
}

.record-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.record-type {
    font-weight: 500;
    color: var(--text-color);
}

.record-amount {
    font-weight: bold;
    color: var(--primary-color);
}

.record-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 侧边栏隐藏 */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* 主内容区占满屏幕 */
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* 布局调整 */
    .container {
        padding: 15px;
    }
    
    .welcome-box {
        padding: 30px 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .text-encrypt-container {
        grid-template-columns: 1fr;
    }
    
    .recharge-container {
        grid-template-columns: 1fr;
    }
}