/* 前端展示页面样式 - 移动端优化 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 0;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 24px;
    color: #3b82f6;
}

.logo h1 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.header-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 13px;
}

.stat-item i {
    color: #10b981;
    font-size: 14px;
}

/* Main */
.main {
    min-height: calc(100vh - 200px);
    padding: 0 16px 60px;
}

/* Domain Grid */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Domain Card */
.domain-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.domain-card:active {
    transform: scale(0.98);
}

.domain-card.status-normal {
    border-left: 4px solid #10b981;
}

.domain-card.status-error {
    border-left: 4px solid #ef4444;
}

.domain-card.status-unknown {
    border-left: 4px solid #9ca3af;
}

/* Domain Header */
.domain-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.domain-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-normal .status-badge {
    background: #d1fae5;
    color: #065f46;
}

.status-error .status-badge {
    background: #fee2e2;
    color: #991b1b;
}

.status-unknown .status-badge {
    background: #f3f4f6;
    color: #4b5563;
}

/* Domain Info */
.domain-info {
    padding: 0 16px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    gap: 12px;
}

.info-label {
    font-size: 13px;
    color: #6b7280;
    flex-shrink: 0;
}

.info-value {
    font-size: 13px;
    color: #1f2937;
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Domain Actions */
.domain-actions {
    padding: 12px 16px;
}

.copy-btn {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #3b82f6;
    color: #fff;
}

.copy-btn:active {
    transform: scale(0.96);
}

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

.copy-btn.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #1f2937;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 15px;
}

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid #e9ecef;
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
}

.footer a {
    color: #3b82f6;
    text-decoration: none;
}

.footer a:active {
    opacity: 0.7;
}

.separator {
    margin: 0 8px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .header {
        padding: 10px 0;
        margin-bottom: 12px;
    }

    .logo i {
        font-size: 18px;
    }

    .logo h1 {
        font-size: 15px;
    }

    .header-stats {
        font-size: 12px;
    }

    .stat-item {
        font-size: 11px;
    }

    .stat-item i {
        font-size: 12px;
    }

    .main {
        padding: 0 12px 50px;
    }

    .domain-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .domain-card {
        border-radius: 10px;
    }

    .domain-header {
        padding: 12px;
    }

    .domain-name {
        font-size: 14px;
    }

    .status-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .domain-info {
        padding: 0 12px 12px;
    }

    .info-row {
        padding: 4px 0;
    }

    .info-label,
    .info-value {
        font-size: 12px;
    }

    .domain-actions {
        padding: 10px 12px;
    }

    .copy-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .toast {
        top: 70px;
        font-size: 12px;
        padding: 10px 16px;
    }

    .footer {
        padding: 12px;
        font-size: 12px;
    }
}

/* 超小屏幕 */
@media (max-width: 375px) {
    .header-content {
        padding: 0 12px;
    }

    .main {
        padding: 0 12px 50px;
    }

    .domain-card {
        border-radius: 10px;
    }

    .domain-header {
        padding: 14px;
    }

    .domain-info {
        padding: 0 14px 14px;
    }

    .domain-actions {
        padding: 10px 14px;
    }

    .logo h1 {
        font-size: 15px;
    }

    .domain-name {
        font-size: 14px;
    }
}

/* 横屏适配 */
@media (max-width: 768px) and (orientation: landscape) {
    .domain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 大屏优化 */
@media (min-width: 1400px) {
    .domain-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .copy-btn {
        min-height: 44px;
    }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    /* 如果需要可以添加暗色模式样式 */
}
