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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}



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

.header {
    text-align: left;
    margin-bottom: 25px;
    color: #333;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-top: 8px;
    font-weight: 400;
}

.header h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 8px;
    color: #333;
}

.logo {
    font-size: 2.0rem;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: -0.5px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', 'Menlo', 'Consolas', monospace;
    position: relative;
    display: inline-block;
    color: transparent;
    background: 
        repeating-linear-gradient(
            90deg,
            #667eea 0px, #667eea 6px,
            transparent 6px, transparent 12px
        ),
        repeating-linear-gradient(
            45deg,
            #764ba2 0px, #764ba2 3px,
            transparent 3px, transparent 6px
        );
    background-size: 12px 100%, 6px 6px;
    -webkit-background-clip: text;
    background-clip: text;
    animation: dashMove 3s linear infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    opacity: 0.8;
}

.logo::before {
    content: '📦';
    position: absolute;
    top: -5px;
    right: -30px;
    font-size: 0.6em;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px) scale(1.05);
    transition: all 0.3s ease;
    animation-duration: 1.5s;
}

.logo:hover::before {
    opacity: 1;
    transform: rotate(10deg);
}

.logo:hover::after {
    width: 100px;
    opacity: 1;
}

.header p {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    font-weight: 400;
}

.search-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    margin-top: 20px;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 300px;
    position: relative;
}

        .domain-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}



.domain-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(102, 102, 102, 0.1);
}

.search-btn {
    padding: 12px 24px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: #555;
}

.search-btn:active {
    background: #222;
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    color: #666;
    font-weight: 400;
    width: 100%;
    padding: 12px 0;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #eee;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes dashMove {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 12px 0, 6px 6px; }
}

/* DNS样式 */
.dns-record {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
}

.dns-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dns-record-type {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.dns-record-ttl {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
}

.dns-record-content {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
}

.dns-record-content br {
    display: block;
    margin: 4px 0;
}

.dns-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 16px;
    color: #c53030;
    text-align: center;
}

.result-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
}

.result-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.domain-link {
    color: #1976d2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.domain-link:hover {
    color: #1565c0;
    text-decoration: underline;
}

.help-icon {
    color: #999;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

.help-icon:hover {
    color: #666;
    background: #f0f0f0;
    border-color: #ccc;
}

.help-tooltip {
    position: absolute;
    top: 30px;
    right: 0;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.help-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #333;
}

.help-tooltip.show {
    display: block;
}

.result-subtitle {
    color: #666;
    font-size: 0.85rem;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
    scroll-behavior: smooth;
}

.tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.tab {
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 400;
    color: #666;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}

.tab.active {
    color: #333;
    border-bottom-color: #333;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.info-grid {
    width: 100%;
}

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

.info-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
    align-items: flex-start;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row-label {
    width: 80px;
    font-weight: 400;
    color: #666;
    font-size: 0.9rem;
    flex-shrink: 0;
    padding-right: 20px;
}

.info-row-value {
    flex: 1;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
}

.time-value {
    color: #333;
    margin-right: 8px;
}

.location-tag {
    background: #e8f4fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-tag {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 6px;
    margin-bottom: 4px;
    display: inline-block;
    font-weight: 500;
}

.domain-age-banner {
    margin-bottom: 8px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-age-tag {
    background: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: inline-block;
    font-weight: 500;
    border: 1px solid #ffeaa7;
}

.author-home-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: inline-block;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.icp-status-tag {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: inline-block;
    font-weight: 500;
    border: 1px solid #c3e6c3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icp-status-tag:hover {
    background: #c8e6c8;
    transform: translateY(-1px);
}

.ns-item {
    color: #333;
    margin-bottom: 2px;
}

.registrar-header {
    font-weight: 400;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.registrar-table {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.registrar-section {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    min-height: 32px;
    align-items: center;
}

.registrar-section:last-child {
    border-bottom: none;
}

.registrar-title {
    width: 60px;
    font-weight: 400;
    color: #666;
    font-size: 0.85rem;
    padding: 6px 10px;
    flex-shrink: 0;
    background: #f0f0f0;
    border-right: 1px solid #e0e0e0;
    text-align: left;
}

.registrar-value {
    color: #333;
    font-size: 0.85rem;
    padding: 6px 10px;
    flex: 1;
    background: #fafafa;
}

.email-link {
    color: #1976d2;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

.raw-data {
    background: #fafafa;
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.raw-data pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 16px;
    color: #c53030;
    margin-top: 16px;
}

.history-section {
    margin-top: 20px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 12px;
}

.history-toggle {
    background: none;
    border: none;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-toggle:hover {
    color: #333;
}

.history-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.history-arrow.expanded {
    transform: rotate(180deg);
}

.history-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.history-content.expanded {
    max-height: 200px;
}

.history-domains {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 0;
}

.history-domain {
    background: #e8f4fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.history-domain:hover {
    background: #1976d2;
    color: white;
}

.history-empty {
    text-align: center;
    color: #999;
    font-size: 0.8rem;
    padding: 20px;
}

.history-clear {
    background: none;
    border: none;
    color: #999;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: none;
}

.history-clear:hover {
    background: #f5f5f5;
    color: #666;
}

.history-clear.show {
    display: inline-block;
}

.price-container {
    margin-top: 12px;
    display: none;
}

.price-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
}

.price-tag {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.price-tag.premium-yes {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #b8860b;
}

.price-tag.status-available {
    background: #e8f5e8;
    border-color: #c3e6c3;
    color: #2e7d32;
}

.price-ranking-tag {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-ranking-tag:hover {
    background: #bbdefb;
    transform: translateY(-1px);
}

/* 价格排行弹出框样式 */
.price-ranking-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.price-ranking-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.price-ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.price-ranking-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.price-ranking-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.price-ranking-close:hover {
    background: #f0f0f0;
    color: #333;
}

.price-ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.price-ranking-table th,
.price-ranking-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.price-ranking-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.price-ranking-table td {
    color: #666;
}

.registrar-name {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.registrar-name:hover {
    text-decoration: underline;
}

.price-cell {
    font-weight: 500;
    color: #333;
}

.currency-symbol {
    font-size: 0.9em;
    color: #666;
}

.loading-row {
    text-align: center;
    padding: 20px;
    color: #666;
}

.price-ranking-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

.data-source-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.data-source-link:hover {
    text-decoration: underline;
}

/* 备案信息样式 */
.icp-container {
    background: #ffffff;
    padding: 20px;
    display: block;
}



.icp-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.icp-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
}

.icp-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    min-width: 65px;
    flex-shrink: 0;
}

.icp-value {
    font-size: 0.9rem;
    color: #2c3e50;
    word-break: break-all;
    flex: 1;
    line-height: 1.3;
}

.icp-licence {
    color: #007bff;
    font-weight: 500;
}

/* 旋转动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分段式我的IP按钮样式 */
.myip-link {
    display: flex;
    align-items: stretch;
    text-decoration: none;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.myip-link:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.myip-text {
    background: #f8f9fa;
    color: #495057;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    border-right: 1px solid #e1e5e9;
}

.ipv6-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 8px 12px;
    font-size: 0.65rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
}

.separator {
    display: none;
}

.ipv6-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.myip-link:hover .ipv6-badge::before {
    left: 100%;
}

.badge-icon {
    font-size: 0.9em;
    display: inline-block;
    animation: pulse 2s infinite;
}

.badge-text {
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.badge-text-short {
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
    display: none;
}

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

/* 大屏幕显示完整文本 */
@media (min-width: 769px) {
    .myip-text {
        font-size: 0.8rem;
        padding: 8px 14px;
    }

    .ipv6-badge {
        font-size: 0.7rem;
        padding: 8px 14px;
        gap: 5px;
    }

    .badge-text {
        display: inline;
    }

    .badge-text-short {
        display: none;
    }
}





@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        padding: 0;
        margin: 0;
    }

    .search-container {
        background: white;
        border-radius: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin: 0;
        padding: 20px 15px;
    }

    .result-container {
        padding: 0;
        margin: 0;
    }

    .header {
        margin-bottom: 20px;
    }



    .search-form {
        flex-direction: row;
        padding: 0 3px 15px 3px;
        margin: 0;
        gap: 4px;
    }

    .input-group {
        flex: 1;
        min-width: 0;
        margin: 0;
    }

    .search-btn {
        padding: 12px 16px;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .domain-input {
        font-size: 16px; /* 防止iOS Safari缩放 */
        padding: 10px 12px;
    }

    .loading {
        margin-top: 12px;
        margin-left: 0;
        margin-right: 0;
        border-radius: 4px;
        font-size: 0.9rem;
    }

    .loading-text {
        display: none;
    }

    .loading::after {
        content: "查询中...";
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .logo {
        font-size: 2.2rem;
        letter-spacing: -0.5px;
    }

    .logo::before {
        right: -20px;
        top: -3px;
        font-size: 0.5em;
    }

    .history-section {
        padding: 0 3px 15px 3px;
        margin: 4px 0 0 0;
    }

    .price-container {
        margin: -2px 3px 8px 3px;
        padding: 0;
    }

    .result-container {
        margin: 0;
        border-radius: 0;
        padding: 20px 15px;
    }

    .info-row {
        flex-direction: column;
        gap: 4px;
    }

    .info-row-label {
        width: auto;
        padding-right: 0;
        font-weight: 500;
    }

    .info-row-value {
        padding-left: 0;
    }

    .price-tags {
        gap: 6px;
        justify-content: flex-start;
    }

    .price-tag {
        font-size: 11px;
        padding: 3px 6px;
    }

    .price-ranking-tag {
        font-size: 11px;
        padding: 3px 6px;
    }

    .icp-container {
        padding: 16px;
        margin: 0 3px;
    }



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

    .icp-label {
        font-size: 0.9rem;
        min-width: 50px;
    }

    .icp-value {
        font-size: 0.9rem;
    }

    .icp-status-tag {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .history-domains {
        justify-content: flex-start;
        gap: 6px;
    }

    .history-domain {
        font-size: 11px;
        padding: 4px 8px;
    }

    .dns-record {
        margin-bottom: 16px;
        padding: 12px;
    }

    .dns-record-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .dns-record-content {
        font-size: 0.8rem;
        padding: 8px;
    }

    .myip-text {
        font-size: 0.7rem;
        padding: 6px 10px;
    }

    .ipv6-badge {
        font-size: 0.6rem;
        padding: 6px 10px;
        gap: 3px;
    }

    .badge-icon {
        font-size: 0.8em;
    }

    .badge-text {
        display: none;
    }

    .badge-text-short {
        display: inline;
    }

    /* 标签栏移动端样式 */
    .tabs {
        margin-bottom: 16px;
        padding: 2px 3px;
        gap: 6px;
    }

    .tab {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 70px;
        text-align: center;
    }

    /* 移动端提示框优化 */
    .help-tooltip {
        right: -10px;
        top: 25px;
        font-size: 0.75rem;
        padding: 6px 10px;
        white-space: normal;
        width: 100px;
        text-align: center;
    }

    .help-tooltip::before {
        right: 15px;
    }

    .result-title {
        font-size: 1.1rem;
        gap: 6px;
    }

    .help-icon {
        width: 18px;
        height: 18px;
        font-size: 0.8rem;
    }
}
