/* =========================================
   WHOIS Modern Redesign
   ========================================= */

body {
    background-color: #f8fbff;
}

/* Hero Search Section */
.whois-hero-section {
    background: linear-gradient(135deg, #0056cc 0%, #006eff 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.whois-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 50%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(30deg);
}

.whois-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.whois-hero-title {
    color: #fff;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
}

.whois-hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 40px;
}

.whois-search-wrapper {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.whois-search-form {
    display: flex;
    align-items: center;
    height: 60px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 20px;
}

.search-icon {
    color: #999;
    font-size: 20px;
    margin-right: 12px;
}

.whois-search-input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.whois-search-input::placeholder {
    color: #aaa;
}

.whois-search-btn {
    width: 160px;
    height: 100%;
    background: #ff6b00; /* Contrast color for CTA */
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.whois-search-btn:hover {
    background: #e66000;
}

.whois-features {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.feature-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feature-item i {
    color: #52c41a;
    font-size: 16px;
}

/* Main Container & Layout */
.whois-main-container {
    padding: 40px 0 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.whois-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 30px;
    align-items: start;
}

/* Sidebar Components */
.sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    overflow: hidden;
}

.sidebar-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafcff;
}

.sidebar-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card-header h3 i {
    color: #006eff;
    font-size: 18px;
}

.sidebar-card-body {
    padding: 20px;
}

.sidebar-card-body.p-0 {
    padding: 0;
}

/* Latest Queries List */
.latest-query-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.latest-query-list li {
    padding: 12px 20px;
    border-bottom: 1px solid #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.latest-query-list li:hover {
    background-color: #f8fbff;
}

.latest-query-list li:last-child {
    border-bottom: none;
}

.query-domain a {
    color: #1f2937;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
    max-width: 140px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.query-domain a:hover {
    color: #006eff;
}

.query-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.query-meta .q-time {
    font-size: 12px;
    color: #9ca3af;
}

.query-meta .q-ip {
    font-size: 11px;
    color: #d1d5db;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Article List */
.article-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-list li {
    border-bottom: 1px solid #f9fafb;
}

.article-list li:last-child {
    border-bottom: none;
}

.article-list a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.article-list a:hover {
    background-color: #f8fbff;
}

.article-title {
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.article-list a:hover .article-title {
    color: #006eff;
}

.article-date {
    font-size: 12px;
    color: #9ca3af;
}

.empty-state {
    padding: 30px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* Compact Status List for Sidebar */
.status-explain-list.compact {
    gap: 6px;
}

.status-explain-list.compact .status-item {
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-explain-list.compact .status-item .code {
    flex: 1;
    font-size: 12px;
}

.status-explain-list.compact .status-item .desc {
    flex: 0 0 70px;
    font-size: 12px;
    text-align: right;
}

/* Cards */
.whois-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    overflow: hidden;
}

.whois-card-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafcff;
}

.whois-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whois-card-title i {
    color: var(--primary-blue, #006eff);
    font-size: 20px;
}

.whois-card-title span {
    color: var(--primary-blue, #006eff);
}

.whois-time-badge {
    font-size: 13px;
    color: #8c94a3;
    background: #f4f7fc;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Unregistered State */
.unregistered-card {
    text-align: center;
    padding: 60px 20px;
}

.unreg-icon-wrap {
    width: 80px;
    height: 80px;
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.unreg-icon-wrap i {
    font-size: 40px;
}

.unreg-content h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 16px;
}

.unreg-content p {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 8px;
}

.unreg-content p strong {
    color: #006eff;
}

.unreg-subtext {
    font-size: 14px;
    color: #8c94a3;
    margin-bottom: 30px;
}

.whois-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #006eff;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 110, 255, 0.3);
}

.whois-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 110, 255, 0.4);
}

/* Results Info List */
.whois-result-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.whois-info-list {
    padding: 10px 30px;
}

.whois-info-row {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px dashed #f0f0f0;
}

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

.whois-label {
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.whois-label .zh {
    font-size: 15px;
    font-weight: 600;
    color: #4b5563;
}

.whois-label .en {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.whois-value {
    flex: 1;
    font-size: 15px;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.highlight-value {
    font-weight: 600;
    color: #006eff;
}

.expire-value {
    color: #eab308;
    font-weight: 600;
}

.status-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-tag {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid transparent;
}

.status-tag.status-default {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #4b5563;
}

.status-tag.status-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.status-tag.status-warning {
    background: #fffbeb;
    border-color: #fef08a;
    color: #d97706;
}

.status-tag.status-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.status-tag.status-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.status-tag.empty {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.dns-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dns-list li {
    padding: 4px 0;
    color: #4b5563;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Raw Info Card */
.whois-raw-content {
    padding: 0;
    background: #1e1e1e;
}

.whois-raw-content pre {
    margin: 0;
    padding: 30px;
    color: #a6accd;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Help / Documentation Section */
.help-card {
    padding-bottom: 20px;
}

.help-section {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px;
}

.help-subtitle {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    position: relative;
    padding-left: 12px;
}

.help-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: #006eff;
    border-radius: 2px;
}

.help-text p {
    font-size: 14px;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 12px;
}

.highlight-text {
    background: #fffbe6;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #faad14;
    color: #d46b08 !important;
}

.highlight-text i {
    margin-right: 6px;
}

.rule-block h4 {
    font-size: 15px;
    color: #374151;
    margin: 0 0 12px 0;
}

.mt-4 { margin-top: 24px; }

.custom-list {
    padding-left: 20px;
    margin: 0;
}

.custom-list li {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 8px;
}

.custom-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-bullet-list li {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 8px;
    position: relative;
    padding-left: 16px;
}

.custom-bullet-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #006eff;
}

.custom-bullet-list code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #ef4444;
    font-size: 13px;
}

.status-explain-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.status-item .code {
    flex: 0 0 200px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 13px;
    color: #006eff;
    font-weight: 600;
}

.status-item .desc {
    flex: 1;
    font-size: 13px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 1200px) {
    .whois-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

@media (max-width: 992px) {
    .whois-layout {
        grid-template-columns: 1fr;
    }

    .whois-info-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .whois-label {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .whois-value {
        padding-left: 0;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
    }
    
    .status-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .status-item .code {
        flex: auto;
    }
}

@media (max-width: 768px) {
    .whois-hero-section {
        padding: 40px 0;
    }
    
    .whois-hero-title {
        font-size: 28px;
    }
    
    .whois-search-form {
        flex-direction: column;
        height: auto;
        background: transparent;
        box-shadow: none;
        gap: 12px;
    }
    
    .search-input-group {
        background: #fff;
        height: 50px;
        border-radius: 8px;
    }
    
    .whois-search-btn {
        width: 100%;
        height: 50px;
        border-radius: 8px;
    }
    
    .whois-features {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .whois-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}