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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    padding: 0;
}

/* 헤더 프레임 */
.header-frame {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0));
    z-index: 100;
}

.back-button,
.more-button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 24px;
}

.back-button:hover,
.more-button:hover {
    opacity: 0.7;
}

/* 콘텐츠 영역 */
.content-wrapper {
    padding: 80px 20px 20px 20px;
}

.album-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
}

.album-info-block {
    margin-bottom: 20px;
}

.album-info-text {
    font-size: 14px;
    color: #999;
    margin: 4px 0;
}

/* 그리드 컨트롤 바 */
.grid-control-bar {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    border-bottom: 1px solid #333;
}

.grid-toggle-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.grid-toggle-button:hover {
    opacity: 0.7;
}

/* 사진 그리드 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 0;
    margin-bottom: 40px;
}

.photo-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.photo-card {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    cursor: pointer;
    background-color: #1a1a1a;
}

.photo-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.photo-card:hover img {
    transform: scale(1.05);
}

.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-card:hover .photo-info {
    opacity: 1;
}

.photo-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-date {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

/* 빈 상태 */
.empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    color: #666;
}

/* 로딩 & 에러 */
.loading,
.error {
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    color: #999;
}

.error {
    color: #ff4444;
}

/* 더보기 메뉴 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
}

.menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    z-index: 201;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.menu-item {
    width: 100%;
    padding: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
}

.menu-item:hover {
    background: #333;
}

.menu-item-delete {
    color: #ff4444;
}

.menu-divider {
    height: 1px;
    background: #333;
    margin: 8px 0;
}

/* 이미지 뷰어 모달 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 22px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.viewer-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.viewer-like {
    position: absolute;
    bottom: 40px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 24px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.viewer-like:hover {
    background: rgba(0,0,0,0.9);
}

.viewer-like-count {
    font-size: 16px;
    font-weight: 600;
}

.viewer-prev,
.viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-prev {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.viewer-prev:hover,
.viewer-next:hover {
    background: rgba(0,0,0,0.8);
}

/* 반응형 */
@media (min-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .photo-grid.grid-4 {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
}
