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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #165dff;
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(97, 152, 255, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(107, 119, 255, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(54, 103, 255, 0.3) 0%, transparent 50%);
    min-height: 100vh;
    color: #1d2129;
    overflow-y: scroll;
}

.header {
    text-align: center;
    padding: 48px 20px 36px;
    color: white;
}

.user-info {
    margin-top: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

.logo {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: 2px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 1px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 40px;
    width: 100%;
    position: relative;
}

.query-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-head {
    padding: 20px 28px;
    border-bottom: 1px solid rgba(240, 242, 245, 0.8);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1d2129;
    background: linear-gradient(90deg, rgba(22, 93, 255, 0.05) 0%, rgba(22, 93, 255, 0.02) 100%);
    flex-wrap: wrap;
}

.card-head-premium {
    padding: 28px 32px;
    border-bottom: 2px solid transparent;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #1d2129;
    background: linear-gradient(135deg, #e8f2ff 0%, #f0f5ff 50%, #e8f2ff 100%);
    border-image: linear-gradient(90deg, #165dff, #4080ff) 1;
    position: relative;
}

.premium-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.premium-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tag-security {
    background: linear-gradient(135deg, #f6ffed 0%, #e6fff4 100%);
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.tag-stable {
    background: linear-gradient(135deg, #e8f2ff 0%, #f0f5ff 100%);
    color: #165dff;
    border: 1px solid #adc6ff;
}

.tag-price {
    background: linear-gradient(135deg, #fff7e6 0%, #fff3e0 100%);
    color: #fa8c16;
    border: 1px solid #ffd699;
}

.premium-card {
    border: 1px solid rgba(22, 93, 255, 0.15);
}

.card-icon {
    color: #165dff;
}

.arco-btn-premium {
    background: linear-gradient(135deg, #165dff, #4080ff);
    color: #ffffff;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 16px rgba(22, 93, 255, 0.4);
}

.arco-btn-premium:hover {
    background: linear-gradient(135deg, #4080ff, #165dff);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 93, 255, 0.5);
}

.arco-btn-premium:active {
    transform: translateY(0);
}

.card-body {
    padding: 30px;
}

.generator-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.generator-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.generator-label {
    font-size: 14px;
    font-weight: 600;
    color: #4e5969;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-option {
    padding: 10px 20px;
    border: 2px solid #e5e6eb;
    border-radius: 12px;
    background: white;
    color: #4e5969;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-option:hover {
    border-color: #165dff;
    color: #165dff;
    background: rgba(22, 93, 255, 0.05);
}

.btn-option.active {
    background: linear-gradient(135deg, #165dff, #4080ff);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
}

.domain-input {
    width: 100%;
    min-height: 160px;
    padding: 18px;
    border: 2px solid #e5e6eb;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    transition: all 0.3s;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: #1d2129;
    background: #fafbfc;
}

.domain-input:focus {
    border-color: #165dff;
    box-shadow: 0 0 0 4px rgba(22, 93, 255, 0.1);
    background: white;
}

.action-bar {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.batch-suffix-selector {
    margin-top: 16px;
    padding: 14px;
    background: #f7f8fa;
    border-radius: 10px;
}

.suffix-label {
    font-size: 13px;
    color: #4e5969;
    margin-bottom: 10px;
    font-weight: 500;
}

.suffix-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suffix-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: white;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.suffix-checkbox:hover {
    border-color: #165dff;
    background: #f0f5ff;
}

.suffix-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.suffix-custom {
    margin-top: 10px;
}

.suffix-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.suffix-input:focus {
    border-color: #165dff;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
}

.suffix-hot {
    border-color: #ff4d4f;
    background: #fff2f0;
}

.suffix-hot:hover {
    border-color: #ff4d4f;
    background: #fff1f0;
}

.hot-tag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #ff4d4f;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 2px;
    margin-left: 4px;
}

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

.results-section {
    margin-top: 28px;
    min-height: 400px;
    position: relative;
}

.empty-message {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    color: #ffffff;
    font-size: 18px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 30px 50px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    width: 80%;
    max-width: 400px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 4px;
}

.results-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.results-title svg {
    opacity: 0.95;
}

.results-count {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
}

.results-filter, .results-actions {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 6px;
}

.filter-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
    background: white;
    color: #165dff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

.domain-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.domain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s;
}

.domain-card-available::before {
    background: linear-gradient(90deg, #00b42a, #23c343);
}

.domain-card-taken::before {
    background: linear-gradient(90deg, #f53f3f, #f76560);
}

.domain-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.domain-card-available:hover {
    border-color: rgba(0, 180, 42, 0.2);
}

.domain-card-taken:hover {
    border-color: rgba(245, 63, 63, 0.2);
}

.domain-card-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.domain-name-row {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
}

.domain-name {
    font-size: 26px;
    font-weight: 800;
    color: #1d2129;
    white-space: nowrap;
    letter-spacing: 0.5px;
    word-break: break-all;
}

.domain-suffix {
    font-size: 26px;
    font-weight: 800;
    color: #165dff;
    letter-spacing: 0.5px;
}

.domain-status {
    display: none;
}

.status-available {
    background: rgba(0, 180, 42, 0.1);
    color: #00b42a;
}

.status-taken {
    background: rgba(245, 63, 63, 0.1);
    color: #f53f3f;
}

.domain-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.occupy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #165dff, #4080ff);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 16px rgba(22, 93, 255, 0.35);
    width: 100%;
    justify-content: center;
}

.occupy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(22, 93, 255, 0.45);
}

.occupy-btn:active:not(:disabled) {
    transform: translateY(0);
}

.occupy-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.occupy-btn-done {
    background: #e5e6eb;
    color: #86909c;
    box-shadow: none;
}

.taken-label {
    font-size: 14px;
    color: #c9cdd4;
    font-weight: 600;
    padding: 10px 0;
}

.local-domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.local-domain-card {
    background: linear-gradient(135deg, rgba(22, 93, 255, 0.05) 0%, rgba(22, 93, 255, 0.02) 100%);
    border: 2px solid rgba(22, 93, 255, 0.15);
    border-radius: 14px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s;
    cursor: default;
}

.local-domain-card:hover {
    border-color: #165dff;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(22, 93, 255, 0.2);
    background: linear-gradient(135deg, rgba(22, 93, 255, 0.08) 0%, rgba(22, 93, 255, 0.04) 100%);
}

.local-domain-name {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-wrap: wrap;
}

.local-domain-main {
    font-size: 17px;
    font-weight: 800;
    color: #1d2129;
    letter-spacing: 0.5px;
    word-break: break-all;
}

.local-domain-suffix {
    font-size: 17px;
    font-weight: 800;
    color: #165dff;
}

.local-domain-platform {
    font-size: 12px;
    color: #86909c;
    font-weight: 600;
    padding: 4px 12px;
    background: #f0f2f5;
    border-radius: 8px;
    width: fit-content;
}

.price-text {
    color: #f53f3f;
    font-weight: 700;
    font-size: 15px;
}

.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    z-index: 1000;
}

.modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    min-width: 420px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #f0f2f5;
    font-weight: 700;
    font-size: 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #86909c;
    padding: 0 6px;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #1d2129;
}

.modal-body {
    padding: 32px 28px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e6eb;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-actions {
    margin-top: 28px;
    text-align: center;
}

.result-success {
    text-align: center;
    padding: 24px 0;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 20px;
    color: #1d2129;
}

.result-subtitle {
    font-size: 15px;
    color: #4e5969;
    margin-top: 10px;
    line-height: 1.8;
}

.contact-info {
    margin-top: 16px;
    color: #165dff;
    font-weight: 700;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(22, 93, 255, 0.06) 0%, rgba(22, 93, 255, 0.03) 100%);
    border-radius: 12px;
    border: 1px solid rgba(22, 93, 255, 0.1);
}

.contact-label {
    font-size: 14px;
    color: #4e5969;
    font-weight: 600;
}

.contact-value {
    font-size: 15px;
    color: #1d2129;
    font-weight: 700;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #165dff, #4080ff);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

.wechat-item {
    position: relative;
}

.wechat-qr-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.wechat-qr-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.wechat-item:hover .wechat-qr-popup {
    opacity: 1;
    visibility: visible;
}

.wechat-qr-popup img {
    width: 160px;
    height: 160px;
    display: block;
}

.toast-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    pointer-events: none;
}

.my-domains-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
}

.my-domain-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(22, 93, 255, 0.08) 0%, rgba(22, 93, 255, 0.03) 100%);
    border: 1px solid rgba(22, 93, 255, 0.15);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2129;
}

.my-domain-item .domain-name {
    color: #165dff;
    font-size: 15px;
}

.my-domains-tip {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.1) 0%, rgba(255, 153, 0, 0.05) 100%);
    border: 1px solid rgba(255, 153, 0, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    color: #d9360b;
    font-size: 13px;
    font-weight: 500;
}

.card-toggle-icon {
    margin-left: 8px;
    transition: transform 0.3s ease;
    color: #86909c;
}

.footer {
    text-align: center;
    padding: 32px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

.load-more-hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 16px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

@media (max-width: 768px) {
    .logo {
        font-size: 28px;
    }

    .subtitle {
        font-size: 14px;
    }

    .header {
        padding: 60px 20px 24px;
    }

    .container {
        padding: 0 12px 24px;
    }

    .card-body {
        padding: 16px;
    }

    .card-head {
        padding: 16px 20px;
        flex-wrap: wrap;
    }

    .generator-row {
        flex-direction: column;
        align-items: stretch;
    }

    .action-bar {
        flex-direction: column;
        gap: 10px;
    }

    .action-bar .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-box {
        min-width: auto;
        width: 90vw;
    }

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

    .results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .domain-card {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    padding: 14px;
    gap: 12px;
}

    .domain-card-main {
        flex: 1;
        min-width: 100%;
    }

    .domain-card-action {
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: center;
        width: 100%;
    }

    .occupy-btn {
        white-space: nowrap;
        padding: 10px 20px;
        width: 100%;
        justify-content: center;
    }

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

    .domain-suffix {
        font-size: 20px;
    }

    .local-domains-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .my-domains-list {
        gap: 8px;
    }

    .my-domain-item {
        padding: 6px 12px;
        font-size: 13px;
    }

    .premium-tags {
        flex-wrap: wrap;
        gap: 6px;
    }

    .batch-suffix-options {
        grid-template-columns: repeat(3, 1fr);
    }

    .length-group {
        flex-wrap: wrap;
    }

    .btn-option {
        padding: 8px 12px;
        font-size: 13px;
    }

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