@charset "utf-8";

/* 
  DS Gallery Latest Skin Styles 
  - 5-column grid layout
  - Card design
  - Light & Dark mode support
*/

/* Color Variables */
:root {
    --card-bg: #ffffff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
    --card-border: #e9e9e9;
    --text-color: #333;
    --text-color-light: #777;
    --title-color: #111;
    --accent-color: #3498db;
    --more-btn-bg: #f5f5f5;
    --more-btn-bg-hover: #e9e9e9;
    --more-btn-text: #555;
}

@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: #2c2c2c;
        --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        --card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.4);
        --card-border: #444;
        --text-color: #ccc;
        --text-color-light: #999;
        --title-color: #f1f1f1;
        --accent-color: #5dade2;
        --more-btn-bg: #3a3a3a;
        --more-btn-bg-hover: #4f4f4f;
        --more-btn-text: #eee;
    }
}

.ds_gallery {
    width: 100%;
    max-width: 1650px; /* Adjust as needed */
    margin: 0 auto;
    padding: 20px 0;
}

.ds_gallery .lat_title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: left;
    padding-left: 10px;
}

.ds_gallery .lat_title a {
    color: var(--title-color);
    text-decoration: none;
    transition: color 0.3s;
}
.ds_gallery .lat_title a:hover {
    color: var(--accent-color);
}

.ds_gallery .gallery_list {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5열 그리드 */
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ds_gallery .gallery_item {
    overflow: hidden;
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ds_gallery .gallery_item:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.ds_gallery .gallery_card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    height: 100%;
}

.ds_gallery .card_thumbnail {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect ratio */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ds_gallery .card_icons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.ds_gallery .card_icons span {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    border-radius: 4px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.ds_gallery .icon_secret { background-color: #e74c3c; }
.ds_gallery .icon_new { background-color: #2ecc71; }
.ds_gallery .icon_hot { background-color: #f39c12; }

.ds_gallery .card_content {
    padding: 15px;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ds_gallery .card_subject {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0 0 10px 0;
    line-height: 1.4;
    flex-grow: 1; /* 제목이 길어져도 다른 카드 높이에 맞춤 */
    word-break: keep-all;
}

.ds_gallery .card_subject strong {
    color: var(--accent-color);
}

.ds_gallery .card_info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: var(--text-color-light);
    gap: 4px 10px;
    margin-top: auto; /* 항상 하단에 위치 */
}

.ds_gallery .card_name {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.ds_gallery .card_name .profile_img {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50%;
    margin-right: 6px;
    object-fit: cover;
}

.ds_gallery .card_comment {
    margin-left: auto; /* 댓글 수를 오른쪽으로 보냄 */
}

.ds_gallery .empty_li {
    grid-column: 1 / -1; /* 전체 너비 차지 */
    text-align: center;
    padding: 80px 20px;
    color: var(--text-color-light);
    background: var(--card-bg);
    border: 1px dashed var(--card-border);
    border-radius: 12px;
}

.ds_gallery .lt_more {
    display: block;
    width: 150px;
    margin: 30px auto 0;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    color: var(--more-btn-text);
    background-color: var(--more-btn-bg);
    border-radius: 8px;
    transition: background-color 0.3s;
}

.ds_gallery .lt_more:hover {
    background-color: var(--more-btn-bg-hover);
}