/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 14px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-info {
    background: #17a2b8;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-info:hover {
    background: #138496;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 状态提示 */
.status-box {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.status-box h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    color: #666;
    font-size: 14px;
}

.status-value {
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 500;
}

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

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 登录页面 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #333;
    font-size: 24px;
}

/* 后台管理 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.admin-header h1 {
    color: #333;
    font-size: 24px;
}

.user-info {
    color: #666;
    font-size: 14px;
}

.filter-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 12px 15px;
    text-align: left;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 12px 15px;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

tr:hover {
    background: #f8f9fa;
}

.url-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-link {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s;
}

.url-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.pagination .page-info {
    color: #666;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .input-group {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .browser-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 浏览器教程样式 */
.tutorial-box {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe4cc 100%);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.15);
    border: 3px solid #ff6b00;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #ff6b00; }
    50% { border-color: #ff8c00; }
}

.tutorial-header {
    text-align: center;
    margin-bottom: 20px;
}

.tutorial-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: shake 2s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-5deg); }
    20%, 40%, 60%, 80% { transform: rotate(5deg); }
}

.tutorial-header h3 {
    color: #d84315;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
}

.tutorial-desc {
    text-align: center;
    color: #d84315;
    font-size: 15px;
    margin-bottom: 20px;
    font-weight: 500;
    line-height: 1.6;
}

.tutorial-notice {
    background: #fff;
    border-left: 5px solid #ff6b00;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    color: #333;
}

.tutorial-notice strong {
    color: #ff6b00;
    font-size: 18px;
}

.browser-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.browser-card {
    background: white;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.browser-card::before {
    content: '点击查看';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff6b00;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.browser-card:hover::before {
    opacity: 1;
}

.browser-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
    border-color: #ff6b00;
}

.browser-icon {
    margin-bottom: 12px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.browser-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.browser-card:hover .browser-icon {
    transform: scale(1.15) rotate(5deg);
}

.browser-name {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.browser-hint {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.browser-card:hover .browser-name {
    color: #ff6b00;
}

.tutorial-footer {
    margin-top: 25px;
    text-align: center;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 2px dashed #ff6b00;
}

.tutorial-footer p {
    color: #ff6b00;
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

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

@media (max-width: 640px) {
    .tutorial-box {
        padding: 20px;
    }
    
    .tutorial-header h3 {
        font-size: 20px;
    }
    
    .tutorial-desc {
        font-size: 14px;
    }
    
    .tutorial-notice {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .tutorial-notice strong {
        font-size: 16px;
    }
    
    .browser-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .browser-card {
        padding: 15px 10px;
    }
    
    .browser-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .browser-name {
        font-size: 14px;
    }
    
    .browser-hint {
        font-size: 11px;
    }
    
    .tutorial-footer p {
        font-size: 13px;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 友情链接样式 */
.links-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
}

.links-box h3 {
    color: #2e7d32;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.link-item {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.link-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    transition: width 0.3s ease;
    z-index: 0;
}

.link-item:hover::before {
    width: 100%;
}

.link-item:hover {
    border-color: #4caf50;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.link-name {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.link-item:hover .link-name {
    color: white;
}

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

/* 教程弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.8;
}

.modal-body h3 {
    color: #667eea;
    font-size: 18px;
    margin: 20px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    color: #333;
    font-size: 15px;
    margin: 10px 0;
}

.modal-body ol {
    padding-left: 25px;
    color: #333;
}

.modal-body li {
    margin: 12px 0;
    font-size: 15px;
    line-height: 1.8;
}

.modal-body strong {
    color: #667eea;
    font-weight: 600;
}

.modal-body code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
    font-size: 14px;
}

.tutorial-step {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
}

.tutorial-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    color: #856404;
}

.tutorial-note strong {
    color: #856404;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-body h3 {
        font-size: 16px;
    }
    
    .modal-body p,
    .modal-body li {
        font-size: 14px;
    }
}
