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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* 容器 */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

/* 返回区域 */
.back-section {
    margin-bottom: 20px;
}

.back-section a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.3s;
}

.back-section a:hover {
    opacity: 0.9;
}

/* 内容区域 */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 卡片 */
.profile-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

/* 卡片头部 */
.profile-header {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.card-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 18px;
    color: #495057;
    font-weight: 600;
}

/* 头像区域 */
.avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    color: #667eea;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.join-date {
    font-size: 14px;
    opacity: 0.9;
}

/* 存储空间区域 */
.storage-section {
    padding: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.storage-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.storage-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.storage-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.separator {
    opacity: 0.7;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 5px;
    transition: width 0.3s ease-out, background 0.3s;
}

.storage-percent {
    text-align: center;
    font-size: 14px;
    opacity: 0.9;
}

/* 表单 */
.profile-form {
    padding: 20px 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
}

.input-field:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-field:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
    color: #6c757d;
}

.input-field.error {
    border-color: #dc3545;
}

/* 错误信息 */
.error-message {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #dc3545;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    width: auto;
}

/* 加载动画 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 消息提示 */
.toast {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #28a745;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    animation: slideInRight 0.3s ease-out;
}

.toast.show {
    display: block;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

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

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* 响应式 */
@media (max-width: 768px) {
    .profile-container {
        padding: 10px;
    }

    .profile-header,
    .storage-section {
        padding: 20px;
    }

    .profile-form {
        padding: 15px 20px;
    }

    .card-header {
        padding: 15px 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-header .btn {
        width: 100%;
    }
}
