/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f7fa;
}

/* 顶部导航栏 */
.header {
    background-color: #409eff;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 18px;
    font-weight: bold;
}

.header-right {
    display: flex;
    gap: 10px;
}

/* 主内容区 */
.main {
    padding: 20px;
    min-height: calc(100vh - 60px);
}

/* 卡片样式 */
.sticker-card,
.upload-card {
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 表情包列表 */
.sticker-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sticker-item {
    background-color: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.sticker-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sticker-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 4px;
}

.sticker-info {
    text-align: center;
}

.sticker-description {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.sticker-code {
    font-size: 12px;
    color: #666;
    font-family: monospace;
}

.empty-stickers {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 上传页面样式 */
.crop-container {
    width: 100%;
    max-width: 400px;
    height: 400px;
    border: 1px solid #ddd;
    overflow: hidden;
    margin: 0 auto;
}

.crop-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.login-card {
    width: 400px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 表格图片样式 */
.table-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .header {
        padding: 0 10px;
    }

    .logo {
        font-size: 16px;
    }

    .main {
        padding: 10px;
    }

    .sticker-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .sticker-image {
        width: 120px;
        height: 120px;
    }

    .login-card {
        width: 90%;
        max-width: 400px;
    }

    .crop-container {
        width: 100%;
        height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .header-right {
        flex-direction: column;
        gap: 5px;
    }

    .header-right .el-button {
        padding: 4px 8px;
        font-size: 12px;
    }

    .sticker-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Cropper.js 样式调整 */
.cropper-view-box {
    border-radius: 0;
}

.cropper-face {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 表情合集列表 */
.sticker-pack-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sticker-pack-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sticker-pack-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sticker-pack-cover {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.sticker-pack-cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sticker-pack-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.sticker-pack-info {
    padding: 12px;
}

.sticker-pack-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
}

.sticker-pack-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticker-pack-code {
    font-size: 12px;
    color: #999;
    font-family: monospace;
}

/* 表情合集预览 */
.sticker-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* 封面预览 */
.cover-preview {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f7fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.cover-preview-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.cover-preview-info {
    flex: 1;
}

.cover-filename {
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.sticker-preview-item {
    position: relative;
    aspect-ratio: 1;
}

.sticker-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.sticker-preview-delete {
    position: absolute;
    top: -8px;
    right: -8px;
}

/* 表情合集详情 */
.sticker-pack-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.sticker-pack-detail-cover {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    flex-shrink: 0;
}

.sticker-pack-detail-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.sticker-pack-detail-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.sticker-pack-detail-code {
    font-size: 14px;
    color: #409eff;
    font-family: monospace;
}

.sticker-pack-detail-stickers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.sticker-pack-detail-sticker {
    aspect-ratio: 1;
    background-color: #f5f7fa;
    border-radius: 8px;
    overflow: hidden;
}

.sticker-pack-detail-sticker-image {
    width: 100%;
    height: 100%;
}