/* 冰雪奇缘主题库存日志页面样式 */

/* 基础背景与字体 */
body {
    font-family: 'Arial Rounded MT Bold', 'Helvetica Neue', Arial, sans-serif;
    background-color: #e6f2ff;
    color: #2c3e50;
}

/* 冰雪背景 */
.frozen-background {
    position: relative;
    min-height: 100vh;
    padding: 30px 0 50px;
    background: linear-gradient(135deg, #e4f1fe, #d4e6fb, #c9e0ff);
    overflow: hidden;
}

/* 雪花效果 */
.snowflakes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    color: #fff;
    font-size: 1.5em;
    opacity: 0.8;
    top: -20px;
    animation: snowfall linear infinite;
}

.snowflake:nth-child(1) { left: 10%; animation-duration: 15s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 13s; animation-delay: 2s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 16s; animation-delay: 3s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 14s; animation-delay: 1s; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 12s; animation-delay: 0s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 15s; animation-delay: 2s; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 13s; animation-delay: 1s; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 14s; animation-delay: 3s; }

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* 冰雪主题卡片 */
.frozen-card {
    position: relative;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(79, 149, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid #e1f0ff;
    margin-bottom: 40px;
    overflow: hidden;
    z-index: 2;
}

/* 城堡装饰 */
.castle-decoration {
    position: absolute;
    top: -40px;
    right: 30px;
    width: 120px;
    height: 120px;
    background-image: url('https://i.imgur.com/KkMfwWv.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 1;
    transform: rotate(10deg);
    filter: hue-rotate(190deg);
}

/* 卡片标题栏 */
.card-header-frozen {
    background: linear-gradient(45deg, #7AB6FF, #94C5FF);
    color: #fff;
    padding: 1.5rem;
    border-radius: 18px 18px 0 0;
    text-align: center;
    position: relative;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-header-frozen h4 {
    font-weight: 700;
    margin: 0;
    font-size: 1.6rem;
    z-index: 1;
}

.card-header-frozen i {
    margin-right: 10px;
}

/* 冰晶装饰 */
.ice-crystal {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('https://i.imgur.com/8vZuwlG.png');
    background-size: contain;
    background-repeat: no-repeat;
    filter: brightness(1.2) hue-rotate(190deg);
}

.ice-crystal.left {
    left: 20px;
    transform: rotate(-30deg) scale(0.8);
}

.ice-crystal.right {
    right: 20px;
    transform: rotate(30deg) scale(0.8);
}

/* 卡片内容区 */
.card-body-frozen {
    padding: 2.5rem;
    position: relative;
    z-index: 2;
}

/* 书籍基本信息区域 */
.book-info-row {
    background: linear-gradient(to right, rgba(232, 244, 255, 0.7), rgba(216, 234, 255, 0.4));
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px !important;
    box-shadow: 0 5px 15px rgba(79, 149, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* 书籍封面 */
.book-cover-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-frame {
    position: relative;
    padding: 10px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: rotate(-3deg);
    transition: transform 0.5s ease;
    z-index: 1;
}

.book-frame:hover {
    transform: rotate(0deg) scale(1.05);
}

.book-cover {
    max-height: 250px;
    width: auto;
    object-fit: contain;
    border-radius: 5px;
    transform: rotate(3deg);
    transition: transform 0.5s ease;
}

.book-frame:hover .book-cover {
    transform: rotate(0deg);
}

.book-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(173, 216, 230, 0.4), rgba(173, 216, 230, 0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.book-frame:hover .book-glow {
    opacity: 1;
}

/* 书籍详情 */
.book-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-title {
    color: #4169e1;
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.book-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #7AB6FF, transparent);
    border-radius: 3px;
}

.book-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    margin: 0;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    color: #34495e;
}

.info-item i {
    color: #7AB6FF;
    margin-right: 10px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* 库存标签 */
.frozen-badge {
    display: inline-block;
    padding: 0.35em 0.9em;
    border-radius: 50px;
    font-weight: 600;
    margin-left: 8px;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.high-stock {
    background: linear-gradient(45deg, #e0f7fa, #b3e5fc);
    color: #0277bd;
    border: 1px solid #81d4fa;
}

.low-stock {
    background: linear-gradient(45deg, #fff8e1, #ffecb3);
    color: #ff8f00;
    border: 1px solid #ffe082;
}

.out-stock {
    background: linear-gradient(45deg, #ffebee, #ffcdd2);
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* 历史记录区域 */
.history-section {
    position: relative;
    margin-top: 40px;
}

.section-title {
    color: #4169e1;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.section-title i {
    margin-right: 10px;
    color: #7AB6FF;
}

.magic-underline {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #7AB6FF, transparent);
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 自定义表格 */
.table-container {
    position: relative;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(79, 149, 255, 0.1);
}

.table-frozen {
    width: 100%;
    background-color: white;
    border-collapse: collapse;
}

.table-header-row {
    display: grid;
    grid-template-columns: 0.5fr 1fr 0.8fr 0.8fr 1fr 2fr 1.5fr;
    background: linear-gradient(45deg, #5e81ac, #81a1c1);
    color: white;
    font-weight: 600;
}

.th-frozen {
    padding: 15px;
    text-align: center;
    position: relative;
}

.th-frozen:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.table-body {
    max-height: 500px;
    overflow-y: auto;
}

.table-row {
    display: grid;
    grid-template-columns: 0.5fr 1fr 0.8fr 0.8fr 1fr 2fr 1.5fr;
    border-bottom: 1px solid #ecf0f1;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.table-row:hover {
    background-color: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(79, 149, 255, 0.1);
}

.table-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, #7AB6FF, #5e81ac);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.table-row:hover::before {
    opacity: 1;
}

.td-frozen {
    padding: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remark-cell {
    text-align: left;
    justify-content: flex-start;
    font-style: italic;
    color: #7f8c8d;
}

/* 表格中的徽章 */
.operation-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.operation-badge i {
    margin-left: 5px;
}

.in-badge {
    background: linear-gradient(45deg, #e0f7fa, #b3e5fc);
    color: #0277bd;
    border: 1px solid #81d4fa;
}

.out-badge {
    background: linear-gradient(45deg, #fff8e1, #ffecb3);
    color: #ff8f00;
    border: 1px solid #ffe082;
}

/* 奥拉夫空状态 */
.empty-log {
    grid-template-columns: 1fr !important;
    height: 250px;
}

.empty-message {
    grid-column: span 7;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.olaf-empty {
    text-align: center;
}

.olaf-image {
    width: 120px;
    height: 150px;
    background-image: url('https://i.imgur.com/lM0cLxb.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto 15px;
    animation: olaf-wave 3s infinite;
}

@keyframes olaf-wave {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.olaf-empty p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin: 0;
}

/* 特殊的行样式 */
.log-entry[data-type="in"] {
    background-color: rgba(224, 247, 250, 0.2);
}

.log-entry[data-type="out"] {
    background-color: rgba(255, 248, 225, 0.2);
}

/* 分页容器 */
.pagination-container {
    margin-top: 30px;
    margin-bottom: 10px;
}

.frozen-pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    justify-content: center;
    gap: 5px;
}

.frozen-pagination .page-item {
    margin: 0 2px;
}

.frozen-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    color: #4169e1;
    background-color: white;
    border: 1px solid #e1f0ff;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 40px;
}

.frozen-pagination .page-link:hover {
    background-color: #e1f0ff;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(79, 149, 255, 0.1);
}

.frozen-pagination .page-item.active .page-link {
    background: linear-gradient(45deg, #7AB6FF, #5e81ac);
    color: white;
    border-color: #5e81ac;
}

.frozen-pagination .page-item.disabled .page-link {
    color: #95a5a6;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* 页脚 */
.card-footer-frozen {
    background: linear-gradient(45deg, #ecf5ff, #d8e6ff);
    padding: 1.5rem;
    border-radius: 0 0 18px 18px;
    position: relative;
}

.footer-actions {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.footer-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background-image: url('https://i.imgur.com/KkMfwWv.png');
    background-size: 50px;
    background-repeat: repeat-x;
    opacity: 0.2;
    filter: hue-rotate(190deg);
}

/* 冰雪风格按钮 */
.frozen-btn {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.frozen-btn i {
    margin-right: 8px;
}

.return-btn {
    background: linear-gradient(45deg, #81a1c1, #5e81ac);
}

.return-btn:hover {
    background: linear-gradient(45deg, #5e81ac, #4c6f94);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(94, 129, 172, 0.3);
    color: white;
}

.adjust-btn {
    background: linear-gradient(45deg, #7AB6FF, #5d91e5);
}

.adjust-btn:hover {
    background: linear-gradient(45deg, #5d91e5, #4169e1);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(65, 105, 225, 0.3);
    color: white;
}

.frozen-btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

.frozen-btn:hover::after {
    opacity: 1;
    transform: rotate(45deg) translateY(-50%);
}

/* 动画类 */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

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

.selected-row {
    background-color: #e3f2fd !important;
    position: relative;
    z-index: 1;
}

.selected-row::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(122, 182, 255, 0.1), transparent);
    pointer-events: none;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .table-header-row,
    .table-row {
        grid-template-columns: 0.5fr 1fr 0.8fr 0.8fr 1fr 1.2fr 1.2fr;
    }

    .book-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .book-cover-container {
        margin-bottom: 30px;
    }

    .book-frame {
        transform: rotate(0);
        max-width: 180px;
    }

    .book-cover {
        transform: rotate(0);
        max-height: 200px;
    }

    .book-title {
        text-align: center;
        font-size: 1.5rem;
    }

    .table-header-row,
    .table-row {
        display: flex;
        flex-direction: column;
    }

    .th-frozen:after {
        display: none;
    }

    .th-frozen {
        text-align: left;
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .td-frozen {
        justify-content: flex-start;
        padding: 10px 15px;
        border-bottom: 1px solid #ecf0f1;
    }

    .td-frozen:before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        color: #7f8c8d;
    }

    .footer-actions {
        flex-direction: column;
        gap: 15px;
    }

    .frozen-btn {
        width: 100%;
    }
}
