/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

#app {
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 标题 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: #165DFF;
    color: white;
}

.btn-primary:hover {
    background-color: #0E4AD5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
}

.btn-secondary {
    background-color: #722ED1;
    color: white;
}

.btn-secondary:hover {
    background-color: #5E1FB5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 46, 209, 0.3);
}

.btn-danger {
    background-color: #F5222D;
    color: white;
}

.btn-danger:hover {
    background-color: #D3171F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 34, 45, 0.3);
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
}

/* 卡片 */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
}

/* 网格 */
.grid {
    display: grid;
    gap: 24px;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}

.login-form {
    margin-bottom: 24px;
}

/* 搜索页面 */
.search-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
}

.search-header {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.search-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.search-content {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.search-logo {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #165DFF 0%, #722ED1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-form {
    position: relative;
    margin-bottom: 32px;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #165DFF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #0E4AD5;
    transform: translateY(-50%) scale(1.05);
}

.search-result {
    margin-top: 40px;
    padding: 20px;
    background: #f5f7fa;
    border-radius: 12px;
}

/* 后台页面 */
.admin-container {
    min-height: 100vh;
    background: #f5f7fa;
}

.admin-header {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.admin-body {
    padding: 32px 0;
}

.admin-section {
    margin-bottom: 32px;
}

.admin-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.website-list {
    margin-top: 24px;
}

.website-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.website-info {
    flex: 1;
}

.website-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.website-url {
    font-size: 14px;
    color: #666;
    word-break: break-all;
}

.website-actions {
    display: flex;
    gap: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .login-card {
        margin: 0 20px;
        padding: 24px;
    }

    .search-logo {
        font-size: 36px;
    }

    .search-input {
        padding: 14px 45px 14px 16px;
    }

    .search-button {
        width: 36px;
        height: 36px;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #165DFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 消息提示 */
.message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.message-success {
    background-color: #f0f9eb;
    color: #52C41A;
    border: 1px solid #b7eb8f;
}

.message-error {
    background-color: #fff2f0;
    color: #F5222D;
    border: 1px solid #ffccc7;
}

.message-info {
    background-color: #e6f7ff;
    color: #1890FF;
    border: 1px solid #91d5ff;
}

/* 隐藏类 */
.hidden {
    display: none;
}