* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
body { font-family: -apple-system, "Malgun Gothic", "맑은 고딕", "돋움", sans-serif; font-size: 14px; color: #333; background: #f5f5f5; }
a { color: #333; text-decoration: none; }
a:hover { color: #e53935; }
ul { list-style: none; }

/* ===== 상단 헤더 ===== */
.header { background: #fff; border-bottom: 1px solid #e0e0e0; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.logo { font-size: 32px; font-weight: 900; color: #e53935; letter-spacing: -1px; font-family: 'Nunito', 'Rounded Mplus 1c', 'Apple SD Gothic Neo', sans-serif; }
.logo small { font-size: 11px; color: #333; font-weight: 500; display: block; letter-spacing: 0; }
/* 로그인 */
.login-area { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.login-area input[type="text"], .login-area input[type="password"] {
	border: 1px solid #ccc; padding: 5px 8px; font-size: 12px; width: 120px; border-radius: 3px;
}
.login-area .btn-login {
	background: #e53935; color: #fff; border: none; padding: 5px 14px; font-size: 12px;
	cursor: pointer; border-radius: 3px; font-weight: bold;
}
.login-area .btn-login:hover { background: #c62828; }
.login-area a { color: #777; font-size: 11px; }
.login-area a:hover { color: #e53935; }
.user-info { font-size: 12px; color: #555; }
.user-info b { color: #333; }
.user-info a { margin-left: 8px; color: #e53935; }

/* ===== 네비게이션 ===== */
.nav { background: #333; }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.nav-menu { display: flex; flex-wrap: wrap; }
.nav-menu li a {
	display: block; padding: 12px 18px; color: #fff; font-size: 14px; font-weight: 500;
	transition: background 0.2s;
}
.nav-menu li a:hover { background: #555; color: #fff; }
.nav-menu li.active a { background: #e53935; }
.nav-buy { padding: 8px 15px; }
.nav-buy a {
	display: inline-block; background: #ffc107; color: #333; padding: 8px 18px;
	border-radius: 4px; font-weight: bold; font-size: 13px;
}
.nav-buy a:hover { background: #ffb300; }
.nav-toggle { display: none; color: #fff; font-size: 24px; padding: 10px 15px; cursor: pointer; }

/* ===== 검색바 ===== */
.search-bar { background: #ebebeb; padding: 15px; }
.search-bar-inner { max-width: 600px; margin: 0 auto; display: flex; gap: 8px; }
.search-bar input[type="text"] {
	flex: 1; padding: 10px 15px; border: 2px solid #ccc; border-radius: 4px;
	font-size: 14px; outline: none;
}
.search-bar input[type="text"]:focus { border-color: #e53935; }
.search-bar button {
	background: #e53935; color: #fff; border: none; padding: 10px 20px;
	border-radius: 4px; font-size: 14px; cursor: pointer; font-weight: bold;
}
.search-bar button:hover { background: #c62828; }

/* ===== 포스터 슬라이더 ===== */
.slider-outer { background: #f5f5f5; padding: 15px 0; }
.slider-wrap { max-width: 1200px; margin: 0 auto; overflow: hidden; padding: 0 15px; }
.slider-track { display: inline-flex; white-space: nowrap; will-change: transform; }
.slider-track img { height: 320px; margin-right: 10px; cursor: pointer; border-radius: 6px; display: block; }

/* ===== 메인 레이아웃 ===== */
.main-wrap { max-width: 1200px; margin: 20px auto; display: flex; gap: 20px; padding: 0 15px; }
.sidebar { width: 220px; flex-shrink: 0; }
.content { flex: 1; min-width: 0; }

/* ===== 서브 페이지 컨텐츠 ===== */
.sub-wrap { max-width: 1200px; margin: 20px auto; padding: 0 15px; }
.sub-title { font-size: 20px; font-weight: bold; color: #333; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #e53935; }
.sub-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.sub-tabs a {
	display: inline-block; padding: 7px 16px; background: #fff; border: 1px solid #ddd;
	border-radius: 20px; font-size: 12px; color: #555;
}
.sub-tabs a:hover, .sub-tabs a.active { background: #e53935; color: #fff; border-color: #e53935; }

/* 프로그램 리스트 (서브페이지용) */
.prog-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.prog-list-box { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.prog-list-head {
	padding: 10px 14px; font-weight: bold; font-size: 13px; color: #fff;
	display: flex; justify-content: space-between; align-items: center;
}
.prog-list-body { padding: 10px 14px; max-height: 500px; overflow-y: auto; }
.prog-list-body ul { list-style: none; }
.prog-list-body li { padding: 4px 0; border-bottom: 1px solid #f5f5f5; }
.prog-list-body li:last-child { border-bottom: none; }
.prog-list-body li a { color: #555; font-size: 12px; }
.prog-list-body li a:hover { color: #e53935; }

/* ===== 달력 ===== */
.cal-box { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.cal-head {
	display: flex; justify-content: space-between; align-items: center;
	background: #e53935; color: #fff; padding: 10px 12px; font-weight: bold; font-size: 14px;
}
.cal-head a { color: #fff; text-decoration: none; font-size: 16px; padding: 0 5px; opacity: 0.8; }
.cal-head a:hover { opacity: 1; }
.cal-head .dis { opacity: 0.3; }
.cal-sub { text-align: center; color: #fff; background: #e53935; padding-bottom: 8px; font-size: 12px; opacity: 0.8; }
.cal-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-tbl th, .cal-tbl td { width: 14.28%; }
.cal-tbl th { padding: 6px 0; font-size: 11px; text-align: center; background: #fafafa; color: #999; border-bottom: 1px solid #eee; }
.cal-tbl td { padding: 5px 0; text-align: center; font-size: 12px; }
.cal-tbl td a { display: block; color: inherit; border-radius: 50%; width: 24px; height: 24px; line-height: 24px; margin: 0 auto; }
.cal-tbl td a:hover { background: #ffebee; color: #e53935; }
.cal-tbl td.sun a { color: #e53935; }
.cal-tbl td.sat a { color: #1565c0; }
.cal-tbl th.sun { color: #e53935; }
.cal-tbl th.sat { color: #1565c0; }
.cal-tbl td.today a { background: #e53935; color: #fff; font-weight: bold; }
.cal-tbl td.empty { color: #ddd; }
.cal-note { text-align: center; padding: 8px; font-size: 10px; color: #aaa; border-top: 1px solid #eee; }
/* 모바일 전용 오늘 날짜 바 */
.m-today-bar { display: none; }

/* ===== 프로그램 섹션 (메인용) ===== */
.prog-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.prog-box { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.prog-head {
	padding: 10px 14px; font-weight: bold; font-size: 13px; color: #fff;
	display: flex; justify-content: space-between; align-items: center;
}
.prog-head .more { color: rgba(255,255,255,0.8); font-size: 11px; }
.prog-head .more:hover { color: #fff; }
.c-movie { background: #c62828; }
.c-foreign { background: #2e7d32; }
.c-notice { background: #546e7a; }
.c-drama { background: #e65100; }
.c-enter { background: #6a1b9a; }
.c-ani { background: #0277bd; }
.c-sisa { background: #37474f; }
.c-child { background: #00695c; }
.c-etc { background: #4e342e; }
.prog-body { padding: 10px 14px; max-height: 380px; overflow-y: auto; }
.prog-body ul { list-style: none; }
.prog-body li { padding: 3px 0; border-bottom: 1px solid #f5f5f5; }
.prog-body li:last-child { border-bottom: none; }
.prog-body li a { color: #555; font-size: 12px; }
.prog-body li a:hover { color: #e53935; }
/* 공지/FAQ 책갈피 탭 */
.nf-tabs { display: flex; gap: 0; margin-right: auto; }
.nf-tab {
	display: inline-block; padding: 3px 14px; font-size: 13px; font-weight: bold;
	background: rgba(255,255,255,0.25); color: #fff; border-radius: 4px 4px 0 0;
	margin-right: 2px; opacity: 0.7; transition: all 0.15s;
}
.nf-tab:hover { opacity: 1; background: rgba(255,255,255,0.45); color: #fff; }
.nf-tab.active { background: #fff; color: #546e7a; opacity: 1; }
/* 공지 */
.notice-item { padding: 4px 0; border-bottom: 1px solid #f0f0f0; font-size: 12px; }
.notice-new { background: #e53935; color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 2px; margin-right: 4px; }

/* ===== 이용권 페이지 ===== */
.coin-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 25px; }
.coin-card { border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.coin-card-head { padding: 14px; font-size: 18px; font-weight: bold; color: #fff; text-align: center; }
.coin-card-body { padding: 15px; background: #fff; text-align: center; }
.coin-card-body p { font-size: 14px; font-weight: bold; color: #333; margin-bottom: 4px; }
.coin-card-body .coin-sub { font-size: 12px; color: #888; font-weight: normal; }
.coin-card.gold .coin-card-head { background: linear-gradient(135deg, #f9a825, #f57f17); }
.coin-card.silver .coin-card-head { background: linear-gradient(135deg, #90a4ae, #546e7a); }
.coin-card.bronze .coin-card-head { background: linear-gradient(135deg, #a1887f, #6d4c41); }
.coupon-list-box { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.coupon-list-head { padding: 12px 18px; background: #e53935; color: #fff; font-weight: bold; font-size: 15px; }
.coupon-list-body { padding: 10px 18px; }
.coupon-item {
	display: flex; align-items: center; gap: 15px; padding: 12px 0;
	border-bottom: 1px solid #f0f0f0; flex-wrap: wrap;
}
.coupon-item:last-child { border-bottom: none; }
.coupon-name { font-weight: bold; color: #c62828; font-size: 15px; min-width: 140px; }
.coupon-period { font-size: 14px; color: #333; min-width: 120px; }
.coupon-price { font-size: 14px; color: #333; min-width: 100px; }
.coupon-buy {
	margin-left: auto; background: #e53935; color: #fff; border: none; padding: 8px 20px;
	border-radius: 4px; font-size: 13px; font-weight: bold; cursor: pointer;
}
.coupon-buy:hover { background: #c62828; }
.paypal-guide-btn {
	display: inline-block; background: #e53935; color: #fff; padding: 12px 30px;
	border-radius: 4px; font-weight: bold; font-size: 14px;
}
.paypal-guide-btn:hover { background: #c62828; color: #fff; }

/* ===== 마이페이지 ===== */
.my-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.my-nav a {
	display: inline-block; padding: 8px 16px; background: #fff; border: 1px solid #ddd;
	border-radius: 4px; font-size: 13px; color: #555;
}
.my-nav a:hover, .my-nav a.active { background: #e53935; color: #fff; border-color: #e53935; }
/* 테이블 */
.my-tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid #ddd; }
.my-tbl th { background: #424242; padding: 10px 12px; font-size: 12px; color: #fff; border-bottom: 1px solid #333; text-align: center; }
.my-tbl td { padding: 10px 12px; font-size: 12px; color: #333; border-bottom: 1px solid #e0e0e0; text-align: center; }
.my-tbl tr:hover td { background: #fafafa; }
.my-tbl tr:last-child td { border-bottom: none; }
.my-tbl .status-wait { color: #e65100; font-weight: bold; }
.my-tbl .status-done { color: #2e7d32; font-weight: bold; }
.my-empty { padding: 40px; text-align: center; color: #999; font-size: 13px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
/* 페이징 */
.my-paging { display: flex; justify-content: center; gap: 4px; margin-top: 15px; flex-wrap: wrap; }
.my-paging a, .my-paging span {
	display: inline-block; padding: 6px 10px; font-size: 12px; border: 1px solid #ddd;
	border-radius: 3px; color: #555; cursor: pointer; background: #fff;
}
.my-paging span.cur { background: #e53935; color: #fff; border-color: #e53935; font-weight: bold; }
.my-paging a:hover { background: #ffebee; border-color: #e53935; color: #e53935; }
.my-paging .dis { color: #ccc; cursor: default; }
/* 버튼 */
.btn-red { background: #e53935; color: #fff; border: none; padding: 6px 14px; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: bold; }
.btn-red:hover { background: #c62828; }
.btn-gray { background: #757575; color: #fff; border: none; padding: 6px 14px; border-radius: 3px; cursor: pointer; font-size: 12px; }
.btn-gray:hover { background: #616161; }
.btn-del { background: #dc3545; color: #fff; border: none; padding: 3px 8px; border-radius: 3px; cursor: pointer; font-size: 11px; }
.btn-del:hover { background: #c82333; }
.btn-play { background: #e53935; color: #fff; border: none; padding: 4px 10px; border-radius: 3px; cursor: pointer; font-size: 11px; }
.btn-play:hover { background: #c62828; }
.btn-play-hd { background: #1565c0; color: #fff; border: none; padding: 4px 10px; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: bold; }
.btn-play-hd:hover { background: #0d47a1; }
/* 정보 테이블 */
.info-tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.info-tbl th { background: #f5f5f5; padding: 12px 15px; font-size: 13px; color: #555; text-align: left; width: 120px; border-bottom: 1px solid #e0e0e0; }
.info-tbl td { padding: 12px 15px; font-size: 13px; color: #333; border-bottom: 1px solid #f0f0f0; }
.info-tbl tr:last-child th, .info-tbl tr:last-child td { border-bottom: none; }
.info-tbl input[type="text"], .info-tbl input[type="password"], .info-tbl select {
	border: 1px solid #ccc; padding: 6px 10px; font-size: 13px; border-radius: 3px;
}
/* Q&A 상세 */
.qa-box { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 15px; }
.qa-head { padding: 14px 18px; font-size: 15px; font-weight: bold; border-bottom: 1px solid #eee; }
.qa-body { padding: 18px; font-size: 13px; color: #555; min-height: 80px; line-height: 1.8; }
.qa-foot { padding: 10px 18px; font-size: 12px; color: #999; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; }
/* 회원탈퇴 */
.out-reason { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0; }
.out-reason label { font-size: 13px; color: #555; display: flex; align-items: center; gap: 6px; }

/* ===== 게시판 (공지/FAQ) ===== */
.board-tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.board-tbl th { background: #f5f5f5; padding: 10px 12px; font-size: 13px; color: #555; border-bottom: 2px solid #e0e0e0; text-align: center; }
.board-tbl td { padding: 10px 12px; font-size: 13px; color: #333; border-bottom: 1px solid #f0f0f0; }
.board-tbl td.center { text-align: center; }
.board-tbl td a { color: #333; }
.board-tbl td a:hover { color: #e53935; }
.board-tbl tbody tr:hover { background: #fafafa; }
.board-pager { display: flex; justify-content: center; gap: 4px; margin-top: 15px; flex-wrap: wrap; }
.board-pager a, .board-pager strong {
	display: inline-block; padding: 6px 10px; font-size: 12px; border: 1px solid #ddd;
	border-radius: 3px; color: #555; background: #fff;
}
.board-pager strong { background: #e53935; color: #fff; border-color: #e53935; }
.board-pager a:hover { background: #ffebee; border-color: #e53935; color: #e53935; }
.btn-board {
	display: inline-block; padding: 8px 20px; background: #666; color: #fff;
	border-radius: 4px; font-size: 13px;
}
.btn-board:hover { background: #555; color: #fff; }

/* ===== 영화 가로배치 ===== */
.movie-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* ===== 반응형 ===== */
@media (max-width: 960px) {
	.prog-grid { grid-template-columns: 1fr 1fr; }
	.prog-list-grid { grid-template-columns: 1fr 1fr; }
	.sidebar { width: 180px; }
}
@media (max-width: 768px) {
	/* PC 전용 숨김 / 모바일 전용 표시 */
	.m-hide { display: none !important; }
	.m-today-bar {
		display: block; background: #e53935; border-radius: 6px; padding: 10px 14px; margin-bottom: 10px;
	}
	.m-today-bar a { color: #fff; font-size: 14px; font-weight: bold; display: block; text-align: center; }
	/* 헤더 */
	.header-inner { flex-direction: column; align-items: stretch; text-align: center; gap: 6px; }
	.login-area { justify-content: center; flex-wrap: wrap; flex-direction: column; align-items: center; gap: 6px; }
	.login-area form { justify-content: center; }
	.user-info { text-align: center !important; }
	/* 햄버거 메뉴 */
	.nav-toggle { display: block; }
	.nav-menu { display: none; flex-direction: column; width: 100%; }
	.nav-menu.open { display: flex; }
	.nav-menu li a { padding: 12px 15px; border-top: 1px solid #444; font-size: 14px; }
	.nav-buy { text-align: center; padding: 10px; }
	/* 검색바 강조 */
	.search-bar { padding: 10px; position: sticky; top: 0; z-index: 50; }
	.search-bar input[type="text"] { font-size: 16px; padding: 12px; }
	.search-bar button { padding: 12px 16px; }
	/* 메인 레이아웃: 세로 */
	.main-wrap { flex-direction: column; padding: 0 10px; margin: 10px auto; gap: 10px; }
	.sidebar { width: 100%; order: 2; }
	.content { order: 1; }
	/* 달력: 한줄 요약, 탭하면 펼침 */
	.m-today-bar { display: block !important; }
	.cal-box { border-radius: 6px; }
	.cal-tbl { display: none; }
	.cal-sub { display: none; }
	.cal-note { display: none; }
	.cal-head { border-radius: 6px; font-size: 13px; padding: 8px 12px; cursor: pointer; }
	.cal-head::after { content: ' ▼'; font-size: 10px; opacity: 0.7; }
	.cal-box.m-cal-open .cal-head { border-radius: 6px 6px 0 0; }
	.cal-box.m-cal-open .cal-head::after { content: ' ▲'; }
	.cal-box.m-cal-open .cal-tbl { display: table; }
	.cal-box.m-cal-open .cal-sub { display: block; }
	.cal-box.m-cal-open .cal-note { display: block; }
	/* 포스터 슬라이더 */
	.slider-track img { height: 180px; }
	/* 메인 프로그램 그리드: 1열 */
	.prog-grid { grid-template-columns: 1fr; gap: 8px; margin-bottom: 10px; }
	.prog-box { border-radius: 4px; }
	/* 메인 프로그램 아코디언 */
	.prog-body { max-height: 0; overflow: hidden; padding: 0 14px; transition: max-height 0.3s ease; }
	.prog-body.m-open { max-height: 500px; overflow-y: auto; padding: 10px 14px; }
	.prog-head { cursor: pointer; padding: 10px 14px; font-size: 13px; }
	.prog-head::after { content: '▼'; font-size: 10px; margin-left: auto; opacity: 0.6; }
	.prog-head.m-expanded::after { content: '▲'; }
	/* 서브 프로그램 리스트: 1열 아코디언 */
	.prog-list-grid { grid-template-columns: 1fr; gap: 8px; }
	.prog-list-body { max-height: 0; overflow: hidden; padding: 0 10px; transition: max-height 0.3s ease; }
	.prog-list-body.m-open { max-height: 60vh; overflow-y: auto; padding: 10px; }
	.prog-list-head { cursor: pointer; padding: 10px 12px; font-size: 13px; }
	.prog-list-head::after { content: ' ▼'; font-size: 10px; opacity: 0.7; }
	.prog-list-head.m-expanded::after { content: ' ▲'; }
	.movie-row { grid-template-columns: 1fr; gap: 8px; }
	/* 테이블 */
	.my-tbl { font-size: 11px; }
	.my-tbl th, .my-tbl td { padding: 8px 6px; }
	/* 서브페이지 */
	.sub-wrap { padding: 10px; }
	.sub-title { font-size: 16px; }
	.sub-tabs { flex-wrap: wrap; gap: 4px; }
	.sub-tabs a { font-size: 12px; padding: 6px 10px; }
	/* 이용권 */
	.coin-cards { grid-template-columns: 1fr; }
	.coupon-item { gap: 8px; }
	.coupon-buy { margin-left: 0; width: 100%; }
	/* 공지/FAQ */
	.board-tbl th, .board-tbl td { padding: 8px 6px; font-size: 11px; }
	/* 공지 탭 */
	.nf-tab { font-size: 11px; padding: 2px 10px; }
}
@media (max-width: 480px) {
	.logo { font-size: 22px; }
	.login-area input[type="text"], .login-area input[type="password"] { width: 80px; font-size: 13px; }
	.slider-track img { height: 140px; }
	/* 테이블: 채널/카테고리 숨김, 제목 넓힘 */
	.my-tbl th:nth-child(3), .my-tbl td:nth-child(3) { display: none; }
	.my-tbl th:nth-child(4), .my-tbl td:nth-child(4) { display: none; }
	.my-tbl th:nth-child(1), .my-tbl td:nth-child(1) { width: 30px; }
	.my-tbl th:nth-child(2), .my-tbl td:nth-child(2) { width: auto; }
	.my-tbl th:nth-child(5), .my-tbl td:nth-child(5) { width: 50px; }
}
