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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 表单样式 */
.auth-form {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #0069d9;
}

.btn-primary {
    background: #007bff;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

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

/* 头部样式 */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 28px;
    color: #007bff;
}

/* 加密货币区域样式 */
.crypto-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

.crypto-item {
    background-color: #007bff;
    border-radius: 6px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.crypto-item:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.crypto-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.crypto-link:hover {
    color: #fff;
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    color: #333;
    font-weight: bold;
}

.main-nav a.active {
    color: #007bff;
}

/* 内容样式 */
.content {
    margin-bottom: 40px;
}

/* 服务网格样式 */
.service-grid {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.service-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.service-item {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    margin: 5px;
    border: 1px solid #eee;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s ease;
}

.icon-container {
    margin-bottom: 15px;
}

.icon-container i {
    font-size: 36px;
    color: #007bff;
    transition: transform 0.3s ease;
}

.service-item:hover .icon-container i {
    transform: scale(1.2);
}

.service-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.1);
}

.service-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.service-link:hover {
    text-decoration: none;
}

.service-item h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.service-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* 页脚样式 */
.main-footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 14px;
}

/* 个人资料页面样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

/* 个人资料页面主内容区域 */
main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

header h1 {
    font-size: 28px;
    color: #007bff;
    margin: 0;
}

header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav li {
    margin-left: 20px;
}

header nav a {
    color: #333;
    font-weight: bold;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

header nav a:hover {
    background-color: #f0f0f0;
    text-decoration: none;
}

header nav a.active {
    color: #fff;
    background-color: #007bff;
}

.profile-info {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 300px;
}

.profile-info h2 {
    color: #007bff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.profile-item {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
}

.profile-item label {
    font-weight: bold;
    width: 120px;
    color: #555;
}

.profile-item span {
    flex: 1;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #eee;
}

.change-password {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 2;
    min-width: 400px;
}

/* 紧凑表单样式 */
.compact-form {
    max-width: 600px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group.half-width {
    flex: 1;
}

.form-row:last-child {
    justify-content: flex-start;
    margin-top: 25px;
}

.form-row button {
    padding: 10px 20px;
    font-size: 14px;
}

.change-password h2 {
    color: #007bff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.change-password .form-group {
    margin-bottom: 20px;
}

.change-password label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.change-password input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.change-password input:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    outline: none;
}

.change-password .error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.change-password button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-password button:hover {
    background-color: #0069d9;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    /* 头部响应式 */
    .main-header {
        flex-direction: column;
        text-align: center;
        padding: 15px 0;
    }
    
    .main-nav {
        margin-top: 15px;
        width: 100%;
    }
    
    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    /* 服务网格响应式 */
    .service-row {
        flex-direction: column;
    }
    
    .service-item {
        min-width: auto;
        margin: 5px 0;
    }
    
    /* 个人资料页面响应式 */
    header {
        flex-direction: column;
        text-align: center;
    }
    
    header nav {
        margin-top: 15px;
    }
    
    header nav ul {
        justify-content: center;
    }
    
    main {
        flex-direction: column;
    }
    
    .profile-layout {
        flex-direction: column;
    }
    
    .profile-info, .change-password {
        width: 100%;
        min-width: auto;
    }
    
    .profile-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-item label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .profile-item span {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group.half-width {
        width: 100%;
    }
}
