/* --- 기본 설정 --- */
body {
    background-color: #121212; /* 고급스러운 검은색 배경 */
    color: #e0e0e0;           /* 기본 글자색 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    display: flex;            /* 사이드바와 메인 콘텐츠를 가로로 배치 */
    height: 100vh;
    overflow: hidden;         /* 전체 페이지 스크롤 방지 */
}

/* --- 사이드바 --- */
.sidebar {
    width: 240px;
    background-color: #000000; /* 완전 검은색으로 구분 */
    padding: 24px;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column; /* 아이템을 세로로 배치 */
    border-right: 1px solid #282828;
}

.sidebar .logo {
    color: white;
    text-align: left;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;

    margin-bottom: 60px;
}

.sidebar .main-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li a {
    display: block;
    color: #b3b3b3;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: #282828;
    color: white;
}

/* "마이페이지"를 맨 아래로 밀어내는 역할 */
.sidebar .footer-nav {
    margin-top: auto; /* 핵심 코드: 남는 공간을 모두 차지해서 아래로 밀어냄 */
}

/* --- 메인 콘텐츠 --- */
.main-content {
    flex-grow: 1;             /* 남은 공간을 모두 차지 */
    padding: 0 40px;
    overflow-y: auto;         /* 내용이 많아지면 이 영역만 스크롤 */
    height: 100vh;
    box-sizing: border-box;
}

.main-content header h1 {
    text-align: center;
    font-size: 2.5em;
    margin: 40px 0;
    color: white;
    letter-spacing: 2px;
}

/* --- 3열 카드 그리드 --- */
.fashion-grid {
    display: grid;
    /* 화면 너비에 맞춰 열 개수가 자동으로 바뀌도록 수정 */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}

.fashion-card {
    background-color: #1c1c1c;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #282828;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.fashion-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.fashion-card .card-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top; /* 이미지를 위쪽 기준으로 보여줌 */
    display: block;
}

.fashion-card .card-content {
    padding: 20px;
}

.fashion-card .celeb-name {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    margin: 0 0 10px 0;
}

.fashion-card .item-count {
    font-size: 0.9em;
    color: #b3b3b3;
}

.fashion-card .content-title {
    font-size: 1em;
    font-weight: 500;
    color: #e0e0e0;
    margin: 0 0 8px 0;
    /* 제목이 길 경우 ...으로 생략 처리 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fashion-card .celeb-name {
    font-size: 0.9em; /* 기존 셀럽 이름은 살짝 작게 조절 */
    font-weight: normal;
    color: #b3b3b3;
    margin: 0 0 10px 0;
}

.main-content header {
    position: relative; /* [핵심] 자식 요소(버튼)를 자유롭게 배치하기 위한 기준점 */
    text-align: center;   /* 내부 텍스트(h1)를 가운데 정렬 */
    margin: 40px 0;
}

/* 헤더 안의 h1 태그 스타일 수정 */
.main-content header h1 {
    margin: 0;
    font-size: 2.5em;
    color: white;
    letter-spacing: 2px;
}

/* 관리자 버튼 스타일 */
.admin-button {
    /* [핵심] 헤더 영역을 기준으로 오른쪽 끝에 배치 */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%); /* 세로 중앙 정렬 */

    /* 눈에 잘 띄는 세련된 색상으로 변경 */
    border-right: 1px solid #282828;
    color: white;

    padding: 10px 15px;
    text-decoration: none;
    border-radius: 50px; /* 둥근 알약 모양 버튼 */
    font-weight: bold;
    transition: background-color 0.2s;
    flex-shrink: 0;
}
.admin-button:hover {
    background-color: #282828; /* 사이드바 호버와 동일한 색상 */
}