/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --chinese-red: #C0392B;
    --gold: #F39C12;
    --dark-ink: #2C3E50;
    --light-bg: #f8f6f3;
    --border-gold: #D4AF37;
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f3f0 0%, #e8e5e0 100%);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(192, 57, 43, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(243, 156, 18, 0.05) 0%, transparent 50%);
    min-height: 100vh;
    color: var(--dark-ink);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--chinese-red) 0%, #A93226 100%);
    padding: 30px 0;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(192, 57, 43, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.site-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 8px;
}

.chinese-char {
    display: inline-block;
    position: relative;
    margin: 0 5px;
    transition: transform 0.3s ease;
}

.chinese-char:hover {
    transform: translateY(-5px);
    color: var(--gold);
}

.site-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info {
    color: #fff;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    background: transparent;
}

.btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.btn-primary:hover {
    background: #E67E22;
    border-color: #E67E22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.btn-block {
    width: 100%;
    display: block;
}

/* 域名卡片容器 */
.domains-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .domains-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* 域名卡片 */
.domain-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}

.domain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--chinese-red), var(--gold));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.domain-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(192, 57, 43, 0.2);
    border-color: var(--gold);
}

.domain-card:hover::before {
    transform: scaleX(1);
}

.domain-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--chinese-red);
    margin-bottom: 10px;
    word-break: break-all;
    line-height: 1.4;
}

.domain-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.domain-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.domain-clicks {
    color: var(--gold);
    font-weight: 500;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 15px;
    border: 2px solid var(--chinese-red);
    background: #fff;
    color: var(--chinese-red);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.pagination button:hover:not(:disabled) {
    background: var(--chinese-red);
    color: #fff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .active {
    background: var(--chinese-red);
    color: #fff;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    border: 3px solid var(--gold);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--chinese-red), var(--gold), var(--chinese-red));
    border-radius: 15px;
    z-index: -1;
    opacity: 0.3;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    color: var(--chinese-red);
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.close:hover {
    transform: rotate(90deg);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #eee;
    background: linear-gradient(135deg, #fff 0%, #f8f6f3 100%);
}

.modal-header h3 {
    color: var(--chinese-red);
    font-size: 1.5rem;
    margin: 0;
}

.modal-body {
    padding: 30px;
}

.domain-detail-name {
    font-size: 2rem;
    color: var(--chinese-red);
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f6f3 0%, #fff 100%);
    border-radius: 10px;
    border: 2px solid var(--gold);
}

.domain-detail-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

/* 认证页面 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f3f0 0%, #e8e5e0 100%);
}

.auth-box {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    border: 3px solid var(--gold);
    position: relative;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--chinese-red), var(--gold));
    border-radius: 15px;
    z-index: -1;
    opacity: 0.2;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    font-size: 2rem;
    color: var(--chinese-red);
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-subtitle {
    color: #666;
    font-size: 0.95rem;
}

.auth-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-ink);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85rem;
}

.error-msg {
    margin-top: 15px;
    padding: 12px;
    background: #fee;
    border: 2px solid var(--chinese-red);
    border-radius: 8px;
    color: var(--chinese-red);
    display: none;
}

.error-msg.show {
    display: block;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: var(--chinese-red);
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* 个人中心 */
.profile-container {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.profile-header h2 {
    color: var(--chinese-red);
    font-size: 1.8rem;
}

.domains-list {
    display: grid;
    gap: 20px;
}

.domain-item {
    background: #f8f6f3;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--chinese-red);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.domain-item:hover {
    background: #f0ede8;
    transform: translateX(5px);
}

.domain-item-info {
    flex: 1;
}

.domain-item-name {
    font-size: 1.2rem;
    color: var(--chinese-red);
    font-weight: 600;
    margin-bottom: 8px;
}

.domain-item-status {
    font-size: 0.85rem;
    color: #999;
}

.domain-item-status.approved {
    color: #27AE60;
}

.domain-item-status.pending {
    color: var(--gold);
}

.domain-item-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 15px;
    font-size: 0.85rem;
}

.domain-form {
    padding: 20px 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

/* 页脚 */
.footer {
    background: var(--dark-ink);
    color: #fff;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .site-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }
    
    .chinese-char {
        margin: 0 2px;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .domain-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .domain-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
