/* Modrinth 配色方案 */
:root {
    --primary-color: #1bd96a;
    --primary-hover: #15a352;
    --secondary-color: #2d9cdb;
    --bg-color: #1f1f23;
    --surface-color: #2d2d33;
    --surface-light: #3d3d44;
    --darker-bg: #1a1a1d;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --text-light: #f8f9fa;
    --text-gray: #adb5bd;
    --border-color: #3d3d44;
    --shadow: rgba(0, 0, 0, 0.3);
    --accent-color: #ff6b6b;
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 登录界面 */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color), var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.login-header {
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 4rem;
    background: var(--primary-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.login-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
}

.login-hint {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 70px);
    padding-top: 70px;
}

.admin-panel {
    display: block;
}

.admin-sidebar {
    width: 250px;
    background: var(--surface-color);
    padding: 2rem 0;
    position: fixed;
    height: calc(100vh - 70px);
    border-right:1px solid var(--border-color);
}

.admin-sidebar h3 {
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(27, 217, 106, 0.1);
    color: var(--text-primary);
    border-left-color: var(--primary-color);
}

.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.admin-section {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section h2 i {
    color: var(--secondary-color);
}

.mod-form {
    max-width: 800px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: var(--surface-light);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.mods-table-container {
    overflow-x: auto;
}

.table-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 0.6rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: var(--surface-light);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    min-width: 150px;
}

.mods-table {
    width: 100%;
    border-collapse: collapse;
}

.mods-table th,
.mods-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mods-table th {
    background: rgba(27, 217, 106, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.mods-table td {
    color: var(--text-secondary);
}

.mods-table tbody tr:hover {
    background: rgba(27, 217, 106, 0.05);
}

.mods-table .mod-icon-cell {
    font-size: 1.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.action-btn.edit {
    background: rgba(27, 217, 106, 0.2);
    color: var(--primary-color);
}

.action-btn.edit:hover {
    background: var(--primary-color);
    color: white;
}

.action-btn.delete {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-color);
}

.action-btn.delete:hover {
    background: var(--accent-color);
    color: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface-color);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    margin: auto;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-content .mod-form {
    padding: 2rem;
}

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: var(--surface-color);
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary);
    z-index: 3000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    border-left-color: #00b894;
}

.notification.error {
    border-left-color: var(--accent-color);
}

.rating-stars {
    color: #ffd700;
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
    }
    
    .search-input,
    .filter-select {
        width: 100%;
    }
}

/* 日志管理样式 */
.logs-management {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
}

.logs-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-card i {
    font-size: 2rem;
    color: var(--accent-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.stat-value.error {
    color: #ff4757;
}

.logs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-input,
.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.filter-input {
    min-width: 200px;
}

.filter-select {
    min-width: 120px;
    cursor: pointer;
}

.action-group {
    display: flex;
    gap: 0.75rem;
}

.logs-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.logs-table th,
.logs-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logs-table th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.logs-table tbody tr {
    transition: background 0.3s;
}

.logs-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.2);
}

.logs-table .status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.success {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
}

.status-badge.error {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.status-badge.warning {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
}

.logs-table .method-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: monospace;
}

.method-badge.get {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
}

.method-badge.post {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.method-badge.put {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
}

.method-badge.delete {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.logs-table .btn-detail {
    padding: 0.25rem 0.75rem;
    border: none;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.3s;
}

.logs-table .btn-detail:hover {
    background: var(--accent-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

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

.pagination button.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* 日志详情弹窗 */
.log-detail-modal .modal-content {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.log-detail-content {
    padding: 1rem;
}

.log-detail-item {
    margin-bottom: 1.5rem;
}

.log-detail-item label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.log-detail-item .value {
    color: var(--text-primary);
    word-break: break-word;
}

.log-detail-item .code-block {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.log-detail-item pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

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

    .logs-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-input,
    .filter-select {
        width: 100%;
        min-width: unset;
    }

    .action-group {
        flex-wrap: wrap;
    }

    .logs-table {
        font-size: 0.75rem;
    }

    .logs-table th,
    .logs-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .logs-stats {
        grid-template-columns: 1fr;
    }
}
