/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
    padding: 20px;
}

/* 容器 */
.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 40px;
}

/* 头部 */
.header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 2px solid #3b82f6;
    margin-bottom: 30px;
}

.header h1 {
    color: #3b82f6;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.subtitle {
    color: #718096;
    font-size: 16px;
}

/* 区块 */
.section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.section:last-of-type {
    border-bottom: none;
}

.section h2 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* 平台按钮 */
.platform-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.platform-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    color: #4a5568;
}

.platform-btn:hover {
    background-color: #edf2f7;
    border-color: #cbd5e0;
}

.platform-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

/* 命令框 */
.command-box {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    position: relative;
}

.command-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.command-box .command-label {
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 10px;
    display: block;
}

.command-box .command-text {
    color: #22d3ee;
    font-weight: 500;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #475569;
    color: #e2e8f0;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: #334155;
}

.copy-btn.copied {
    background-color: #10b981;
}

/* 表单 */
textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.validation-text {
    font-size: 14px;
    color: #718096;
}

.validation-text.valid {
    color: #10b981;
}

.validation-text.invalid {
    color: #ef4444;
}

/* 按钮 */
.button-group {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-primary:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #edf2f7;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    background-color: #f8f9fa;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-small:hover {
    background-color: #edf2f7;
}

.btn-danger-text {
    background: none;
    border: none;
    color: #ef4444;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-danger-text:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* 结果区域 */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: #718096;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
}

.stat-value.success {
    color: #10b981;
}

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

/* 表格 */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

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

.results-table thead {
    background-color: #f8f9fa;
}

.results-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.results-table td {
    padding: 12px 15px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.mac-cell {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    color: #3b82f6;
    font-weight: 500;
}

.vendor-cell {
    font-weight: 500;
    color: #2d3748;
}

.address-cell {
    color: #718096;
    font-size: 13px;
}

.not-found {
    color: #ef4444;
    font-style: italic;
}

/* 历史记录 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.history-item:hover {
    background-color: #edf2f7;
    border-color: #3b82f6;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-item-time {
    font-size: 14px;
    color: #718096;
}

.history-item-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.history-item-preview {
    font-size: 12px;
    color: #4a5568;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

/* 页脚 */
.footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
}

.footer ul {
    list-style: none;
}

.footer li {
    font-size: 14px;
    color: #718096;
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.footer li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3b82f6;
}

.footer p {
    font-size: 14px;
    color: #718096;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.footer-bottom p {
    font-size: 13px;
    color: #a0aec0;
}

.footer-bottom a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-box {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-box span {
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 25px;
    }

    .header h1 {
        font-size: 26px;
    }

    .platform-buttons {
        flex-direction: column;
    }

    .platform-btn {
        width: 100%;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .button-group {
        justify-content: stretch;
    }

    .btn {
        flex: 1;
    }

    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .stats {
        flex-direction: column;
        gap: 15px;
    }

    .table-container {
        font-size: 13px;
    }

    .results-table th,
    .results-table td {
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .header h1 {
        font-size: 22px;
    }

    .section h2 {
        font-size: 18px;
    }
}
