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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 0;
}

.container {
    max-width: 600px;
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px auto;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .form-input {
        padding: 16px;
        font-size: 16px;
    }
    
    .btn-primary {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 56px;
        font-weight: 600;
    }
    
    .query-form {
        gap: 15px;
    }
    
    .result {
        padding: 20px;
        font-size: 15px;
    }
    
    .header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .info-section {
        padding: 15px;
    }
    
    .info-section button {
        margin-top: 10px;
        width: 100%;
    }
}

.container:hover {
    transform: translateY(-5px);
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.subtitle {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 0;
}

.query-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.form-input {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn-primary {
    padding: 14px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

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

.result {
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

.result.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.info-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.info-section p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.history-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.history-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.history-item .domain {
    font-weight: 500;
    color: #333;
}

.history-item .time {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

.no-history {
    text-align: center;
    color: #666;
    margin: 0;
    padding: 20px 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 450px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #2c3e50;
    font-size: 20px;
    margin: 0;
}

.modal-body {
    padding: 10px 0;
}

.price {
    font-size: 18px;
    margin: 15px 0;
}

.price span {
    font-weight: 600;
    color: #4CAF50;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.wechat-qr {
    margin-top: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: inline-block;
}

.wechat-qr img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.admin-link {
    color: #4CAF50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.admin-link:hover {
    color: #3d8b40;
    text-decoration: underline;
}

.copyright {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.image-preview {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-preview p {
    color: #666;
    margin: 0;
}

/* 成功特效动画 */
@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* 失败特效动画 */
@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* 成功淡入动画 */
@keyframes successFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮点击动画 */
@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

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

/* 通知滑入动画 */
@keyframes notificationSlideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 自动补全列表样式 */
.autocomplete-list {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f5f5f5;
}

.autocomplete-item.active {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* 深色模式下的自动补全列表 */
body.dark-mode .autocomplete-list {
    background-color: #1e1e30;
    border: 1px solid #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark-mode .autocomplete-item {
    color: #e0e0e0;
}

body.dark-mode .autocomplete-item:hover {
    background-color: rgba(255,255,255,0.1);
}
/* 深色模式下的自动补全列表 */
body.dark-mode .autocomplete-item.active {
    background-color: rgba(33,150,243,0.2);
    color: #64b5f6;
}

/* 最近查询域名样式 */
.recent-queries-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.recent-query-item {
    background-color: #f5f5f5;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.recent-query-item:hover {
    background-color: #e3f2fd;
    border-color: #bbdefb;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 深色模式下的最近查询域名 */
body.dark-mode .recent-queries h3 {
    color: #ffffff;
}

body.dark-mode .recent-query-item {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #e0e0e0;
}
/* 深色模式下的最近查询域名 */
body.dark-mode .recent-query-item:hover {
    background-color: rgba(33,150,243,0.2);
    border-color: rgba(33,150,243,0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 系统公告样式 */
.announcement {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    padding: 10px 20px;
    margin-bottom: 20px;
    animation: successFadeIn 0.5s ease-out;
}

.announcement h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #856404;
}

.announcement p {
    margin: 0;
    font-size: 14px;
    color: #856404;
}

.announcement button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #856404;
    padding: 0;
    line-height: 1;
}

.announcement button:hover {
    color: #664d03;
}

/* 深色模式下的系统公告 */
body.dark-mode .announcement {
    background-color: rgba(255, 243, 205, 0.1);
    border: 1px solid rgba(255, 238, 186, 0.3);
}

body.dark-mode .announcement h3 {
    color: #ffd700;
}

body.dark-mode .announcement p {
    color: #ffd700;
}

body.dark-mode .announcement button {
    color: #ffd700;
}

body.dark-mode .announcement button:hover {
    color: #ffed4e;
}

/* 企业微信二维码样式 */
.wechat-qr {
    margin-top: 20px;
    text-align: center;
    padding: 10px;
}

.wechat-qr img {
    max-width: 250px;
    width: 100%;
    max-height: 250px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 响应式二维码样式 */
@media (max-width: 768px) {
    .wechat-qr img {
        max-width: 200px;
        max-height: 200px;
    }
    
    .modal-content {
        width: 90%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* 增强的成功状态 */
.result.success {
    animation: successPulse 2s ease-in-out, successFadeIn 0.5s ease-out;
}

/* 增强的失败状态 */
.result.error {
    animation: errorShake 0.5s ease-in-out, successFadeIn 0.5s ease-out;
}

/* 按钮点击效果 */
.btn-primary:active {
    animation: buttonPress 0.2s ease-in-out;
}

/* 成功消息动画 */
.success-message {
    animation: successFadeIn 0.5s ease-out, successPulse 1s ease-in-out 0.5s;
}

/* 加载状态 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* 动画按钮效果 */
.animated-btn {
    position: relative;
    overflow: hidden;
}

.animated-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.animated-btn:active::before {
    width: 300px;
    height: 300px;
}

/* 模态框动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 适配手机 */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }
    
    .container {
        margin: 20px auto;
        padding: 25px;
        width: 100%;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .form-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .modal-content {
        width: 90%;
        margin: 40% auto;
        padding: 25px;
    }
    
    .result {
        padding: 20px;
    }
}

/* 深色模式样式 */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

body.dark-mode .container {
    background-color: #1e1e30;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark-mode .header {
    border-bottom-color: #333;
}

body.dark-mode h1 {
    color: #ffffff;
}

body.dark-mode h3 {
    color: #ffffff;
}

body.dark-mode .subtitle {
    color: #b0b0b0;
}

body.dark-mode .user-id {
    color: #b0b0b0;
}

body.dark-mode #userIdDisplay {
    color: #66bb6a;
}

body.dark-mode .form-label {
    color: #e0e0e0;
}

body.dark-mode .form-input {
    background-color: #2d2d4a;
    border-color: #3d3d5a;
    color: #e0e0e0;
}

body.dark-mode .form-input:focus {
    border-color: #66bb6a;
}

body.dark-mode .btn-primary {
    background-color: #388e3c;
}

body.dark-mode .btn-primary:hover {
    background-color: #4caf50;
}

body.dark-mode .result {
    border-color: #333;
}

body.dark-mode .result.success {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: #388e3c;
}

body.dark-mode .result.error {
    background-color: rgba(244, 67, 54, 0.1);
    border-color: #d32f2f;
}

body.dark-mode .history-section {
    border-top-color: #333;
}

body.dark-mode .history-item {
    background-color: #2d2d4a;
    border-color: #3d3d5a;
}

body.dark-mode .history-item:hover {
    background-color: #3d3d5a;
}

body.dark-mode .info-section {
    border-top-color: #333;
}

body.dark-mode .info-section p {
    color: #b0b0b0;
}

body.dark-mode .modal-content {
    background-color: #1e1e30;
    color: #e0e0e0;
}

body.dark-mode .modal-header h2 {
    color: #ffffff;
}

body.dark-mode .modal-body p {
    color: #b0b0b0;
}

body.dark-mode .close {
    color: #e0e0e0;
}

body.dark-mode .close:hover {
    color: #ffffff;
}

body.dark-mode .success-message {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: #388e3c;
    color: #66bb6a;
}

body.dark-mode .error-message {
    background-color: rgba(244, 67, 54, 0.1);
    border-color: #d32f2f;
    color: #ef5350;
}

body.dark-mode .no-history {
    color: #999;
}

body.dark-mode .price span {
    color: #66bb6a;
}

body.dark-mode .wechat-qr {
    background-color: #2d2d4a;
}

body.dark-mode footer {
    border-top-color: #333;
}

body.dark-mode .copyright {
    color: #666;
}

body.dark-mode .image-preview {
    background-color: #2d2d4a;
    border-color: #3d3d5a;
}

body.dark-mode .image-preview p {
    color: #999;
}

body.dark-mode .history-item .domain {
    color: #e0e0e0;
}

body.dark-mode .history-item .time {
    color: #999;
}

body.dark-mode .history-item .status.success {
    color: #66bb6a;
}

body.dark-mode .history-item .status.error {
    color: #ef5350;
}