/* 生日主题网格相册样式 */
.birthday-grid-container {
    padding: 2rem 0;
}

.birthday-card {
    background: #fff;
    border-radius: 12px;
    padding: 10px 10px 40px 10px; /* 拍立得风格，底部留白多 */
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3); /* 粉色阴影 */
    border: 1px solid #ffe4e1; /* 浅玫瑰色边框 */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible; /* 允许胶带溢出 */
}

.birthday-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 15px 30px rgba(255, 105, 180, 0.4); /* 加深悬停阴影 */
    z-index: 5;
}

/* 装饰性胶带效果 - 模拟贴在墙上的感觉 */
.birthday-card::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    width: 80px;
    height: 25px;
    background-color: rgba(255, 183, 178, 0.7); /* 默认浅红胶带 */
    transform: translateX(-50%) rotate(-2deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 2;
    /* 胶带两端的锯齿效果 */
    mask-image: radial-gradient(circle at 2px 50%, transparent 2px, black 2.5px);
    mask-size: 10px 100%;
    mask-position: 0 0;
    mask-repeat: repeat-x;
    -webkit-mask-image: radial-gradient(circle at 2px 50%, transparent 2px, black 2.5px);
    -webkit-mask-size: 10px 100%;
}

/* 不同位置的卡片使用不同颜色的胶带 */
.col:nth-child(2n) .birthday-card::before {
    background-color: rgba(181, 234, 215, 0.7); /* 浅绿 */
    transform: translateX(-50%) rotate(1.5deg);
}

.col:nth-child(3n) .birthday-card::before {
    background-color: rgba(199, 206, 234, 0.7); /* 浅紫 */
    transform: translateX(-50%) rotate(-1deg);
}

.col:nth-child(4n) .birthday-card::before {
    background-color: rgba(255, 218, 193, 0.7); /* 浅橙 */
    transform: translateX(-50%) rotate(2deg);
}

/* 图片容器 */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1 / 1; /* 正方形图片 */
    background-color: #f8f9fa;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.birthday-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

/* 日期样式 - 日记印章风格 */
.diary-date-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #ff69b4;
    padding: 5px 10px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px dashed #ff69b4;
    box-shadow: 2px 2px 0 rgba(255, 105, 180, 0.2);
    transform: rotate(-3deg);
    z-index: 2;
}

.birthday-card:hover .diary-date-badge {
    transform: rotate(0deg) scale(1.1);
    transition: all 0.3s ease;
}

/* 描述文字 - 手写体风格 */
.card-desc {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #555;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    font-size: 0.95rem;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 装饰图标 */
.card-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff69b4;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

/* 移动端适配优化 */
@media (max-width: 768px) {
    .birthday-card {
        margin-bottom: 15px;
    }
}
