/* 实验室冰箱标本储存管理系统样式文件 - 优化版 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    min-height: 100vh;
}

/* 顶部导航栏 - 玻璃态设计 */
.navbar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-menu a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

/* 页面标题 */
.page-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

/* 卡片样式 - 玻璃态 */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 - 现代设计 */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(-1px);
}

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

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

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #606c88 0%, #3f4c6b 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #3f4c6b 0%, #606c88 100%);
}

/* 冰箱网格 */
.freezer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.freezer-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 35px 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.freezer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.freezer-card:hover::before {
    opacity: 1;
}

.freezer-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.freezer-icon {
    font-size: 90px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.freezer-card:hover .freezer-icon {
    transform: scale(1.1) rotate(5deg);
}

.freezer-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.freezer-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 层级选择 - 3D卡片效果 */
.layer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.layer-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.layer-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: transform 0.6s ease;
}

.layer-card:hover::before {
    transform: translate(-25%, -25%);
}

.layer-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.5);
}

/* 抽屉网格 (5x5) */
.drawer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin: 10px 0;
}

.drawer-cell {
    min-height: 35px;
    max-height: 60px;
    padding: 6px 4px;
    background-color: #03A9F4;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s;
    color: white;
    font-weight: bold;
    font-size: 11px;
}

.drawer-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.drawer-cell.filled {
    background-color: #4CAF50;
}

.drawer-cell.partial {
    background-color: #FF9800;
}

/* 盒子列表 */
.box-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.box-item {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.box-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 样本网格 (9x9) - 增强视觉效果 */
.sample-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 10px;
    margin: 30px 0;
    max-width: 850px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.sample-cell {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 13px;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.sample-cell::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(4px);
}

.sample-cell.empty {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 2px dashed #bdbdbd;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #999;
}

.sample-cell.empty::after {
    display: none;
}

.sample-cell.plasma {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4);
}

.sample-cell.serum {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.sample-cell.urine {
    background: linear-gradient(135deg, #FFC107 0%, #FFA000 100%);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: #333;
}

.sample-cell.other {
    background: linear-gradient(135deg, #9E9E9E 0%, #757575 100%);
    box-shadow: 0 6px 20px rgba(158, 158, 158, 0.4);
}

.sample-cell.sent {
    opacity: 0.6;
    border: 3px solid #333;
    filter: grayscale(30%);
}

.sample-cell:hover {
    transform: scale(1.25) translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.sample-cell.plasma:hover {
    box-shadow: 0 8px 30px rgba(156, 39, 176, 0.6);
}

.sample-cell.serum:hover {
    box-shadow: 0 8px 30px rgba(244, 67, 54, 0.6);
}

.sample-cell.urine:hover {
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.6);
}

/* 样本单元格包装器 - 用于悬停提示 */
.sample-cell-wrapper {
    position: relative;
    display: inline-block;
}

/* 样本悬停提示框 */
.sample-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    min-width: 160px;
}

.sample-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #1a252f;
}

.sample-cell-wrapper:hover .sample-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.tooltip-header {
    font-size: 14px;
    font-weight: bold;
    color: #4facfe;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-row {
    margin: 4px 0;
    line-height: 1.5;
}

.tooltip-label {
    color: rgba(255, 255, 255, 0.7);
    margin-right: 5px;
}

/* 样本网格容器 */
.sample-grid-container {
    padding: 10px;
}

/* 有样本的格子不显示位置编号 */
.sample-cell.has-sample {
    color: transparent;
}

.sample-cell.has-sample:hover {
    color: transparent;
}

/* 表单样式 - 现代设计 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-control:hover {
    border-color: #bbb;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
}

.close-btn {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
}

.close-btn:hover {
    color: #333;
}

/* 统计面板 - 渐变卡片 */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-card:nth-child(2) .stat-number {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card:nth-child(3) .stat-number {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card:nth-child(4) .stat-number {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 15px;
    color: #555;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 面包屑导航 - 玻璃态 */
.breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 18px 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 8px;
}

.breadcrumb a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #764ba2;
}

.breadcrumb span {
    margin: 0 10px;
    color: #aaa;
    font-weight: 500;
}

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

    .drawer-grid {
        gap: 5px;
    }

    .sample-grid {
        gap: 5px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 抽屉和盒子编辑按钮 */
.drawer-edit-btn, .box-edit-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.drawer-cell:hover .drawer-edit-btn,
.box-item:hover .box-edit-btn {
    opacity: 1;
}

.drawer-edit-btn:hover, .box-edit-btn:hover {
    transform: scale(1.2);
    background: white;
}
