/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background-color: #141414;
    color: white;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== UTILITIES ===== */
.icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #FFC107;
    color: #000;
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

.btn-danger {
    background-color: #e50914;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 3rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 10%, transparent);
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background-color: #141414;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.logo {
    color: #FFC107;
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #b3b3b3;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a.active {
    color: white;
    font-weight: bold;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-text {
    font-size: 0.9rem;
    color: #e5e5e5;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0;
}

.search-box.active .search-input {
    width: 200px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #444;
    border-radius: 4px;
    opacity: 1;
    margin-right: 8px;
}

.search-input:focus {
    outline: none;
    border-color: #FFC107;
}

/* User Profile Menu */
.user-profile-menu {
    display: none;
    position: relative;
}

.user-profile-menu.show {
    display: block;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.user-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: linear-gradient(135deg, #FFC107, #FF9800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: #000;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-arrow {
    color: #aaa;
    transition: transform 0.2s;
}

.user-profile-menu:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    min-width: 180px;
    padding: 0.5rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-profile-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown-header #user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-dropdown-divider {
    height: 1px;
    background: #333;
    margin: 0.25rem 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.user-dropdown-item:hover {
    background: #2a2a2a;
    color: #fff;
}

.user-badge {
    background: linear-gradient(135deg, #e50914, #b20710);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    color: #fff;
    display: none;
}

.user-badge.show {
    display: inline-block;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    padding: 8px;
}

/* ===== APP CONTAINER ===== */
.app-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    position: relative;
    flex: 1;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    min-width: 0;
    margin: 5rem auto 0 auto;
    position: relative;
    z-index: 10;
    padding-bottom: 3rem;
    max-width: 1600px;
    width: 100%;
}

/* ===== CONTENT ROWS ===== */
.row {
    margin: 0 3rem 3rem;
}

.row-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #fff;
}

.row-posters {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    gap: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.row-posters::-webkit-scrollbar {
    height: 6px;
}

.row-posters::-webkit-scrollbar-track {
    background: transparent;
}

.row-posters::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.row-posters::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* ===== POSTER CARD ===== */
.poster {
    width: 300px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    scroll-snap-align: start;
    position: relative;
}

.poster:hover {
    transform: scale(1.03);
    z-index: 10;
}

.poster-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background-color: #222;
}

.poster-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.poster:hover .poster-thumbnail img {
    transform: scale(1.05);
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.poster-action {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.2s;
}

.poster:hover .poster-action {
    opacity: 1;
}

.poster-info {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.poster-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #f1f1f1;
}

.poster-meta {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.poster-channel {
    color: #FFC107;
    font-weight: 600;
}

.poster-original-title {
    font-size: 0.85rem;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Heart Button */
.btn-heart {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.btn-heart:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.btn-heart.active {
    color: #e50914;
}

.btn-heart.active svg {
    fill: #e50914;
}

/* ===== CONTENT GRID ===== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.content-grid .poster {
    width: 100%;
}

/* ===== SIDEBAR LAYOUT ===== */
.split-layout {
    display: flex;
    min-height: calc(100vh - 5rem);
}

.sidebar {
    width: 220px;
    background-color: #0a0a0a;
    border-right: 1px solid #222;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    height: calc(100vh - 5rem);
    position: sticky;
    top: 5rem;
    overflow-y: auto;
}

.content-area {
    flex: 1;
    padding: 2rem;
    min-width: 0;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin-bottom: 0.3rem;
}

.sidebar-link {
    padding: 12px 14px;
    color: #999;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-link:hover {
    background-color: #1a1a1a;
    color: white;
}

.sidebar-link.active {
    background-color: #222;
    color: #FFC107;
}

.sidebar-link::after {
    content: '›';
    transform: rotate(90deg);
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.sidebar-item.open .sidebar-link::after {
    transform: rotate(-90deg);
}

.sidebar-submenu {
    list-style: none;
    padding-left: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sidebar-item.open .sidebar-submenu {
    max-height: 500px;
}

.sidebar-submenu li {
    padding: 10px 14px;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-radius: 4px;
}

.sidebar-submenu li:hover,
.sidebar-submenu li.active {
    color: #FFC107;
    background-color: rgba(255, 193, 7, 0.1);
}

/* ===== SORT CONTROLS ===== */
.sort-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sort-select {
    background-color: #1a1a1a;
    color: white;
    border: 1px solid #333;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #FFC107;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #181818;
    width: 90%;
    max-width: 850px;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s;
    overflow-y: auto;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 1);
}

.modal-video-container {
    padding-top: 56.25%;
    position: relative;
    background: black;
}

.modal-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-info {
    padding: 2rem;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.modal-meta .match {
    color: #46d369;
    font-weight: bold;
}

.modal-meta .age {
    border: 1px solid gray;
    padding: 0 6px;
    font-size: 0.8rem;
}

.modal-meta .duration {
    color: #888;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-original-title {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    margin-top: -0.5rem;
}

.modal-desc-container {
    margin-bottom: 1rem;
}

.modal-desc {
    color: #ccc;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.modal-desc.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-toggle-desc {
    background: none;
    border: none;
    color: #FFC107;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    transition: opacity 0.2s;
}

.btn-toggle-desc:hover {
    opacity: 0.8;
}

.modal-genres {
    color: #888;
    font-size: 0.9rem;
}

/* ===== LOGIN MODAL ===== */
.login-modal .modal-content {
    width: 420px;
    max-width: 90%;
    text-align: center;
    padding: 3rem;
}

.login-modal h2 {
    margin-bottom: 1.5rem;
}

.login-modal p {
    color: #aaa;
    margin-bottom: 1.5rem;
}

.btn-google {
    width: 100%;
    justify-content: center;
    background: white;
    color: #333;
    padding: 14px 20px;
    font-weight: 600;
}

.btn-google svg {
    margin-right: 10px;
}

/* ===== LOADING STATES ===== */
.loading {
    text-align: center;
    padding: 4rem;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #FFC107;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-result {
    text-align: center;
    color: #888;
    padding: 5rem 2rem;
    font-size: 1.1rem;
    width: 100%;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#home-content {
    width: 100%;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

/* ===== FOOTER (Sticky) ===== */
.footer {
    background-color: #0a0a0a;
    padding: 2.5rem 2rem;
    border-top: 1px solid #1a1a1a;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #666;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #FFC107;
}

.footer-copyright {
    color: #444;
    font-size: 0.85rem;
}

/* ===== MOBILE NAVIGATION DRAWER ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: #0a0a0a;
    z-index: 150;
    transition: left 0.3s ease;
    padding: 5rem 1.5rem 2rem;
    overflow-y: auto;
}

.mobile-nav.open {
    left: 0;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 140;
    display: none;
}

.mobile-nav-overlay.open {
    display: block;
}

.mobile-nav-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
}

.mobile-nav-links a {
    display: block;
    padding: 1rem 0;
    color: #b3b3b3;
    font-size: 1.1rem;
    border-bottom: 1px solid #1a1a1a;
    transition: color 0.2s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: #FFC107;
}

/* ===== ERROR PAGES ===== */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #141414 0%, #1a1a2e 50%, #16213e 100%);
}

.error-code {
    font-size: 10rem;
    font-weight: 900;
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 50%, #FF5722 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 40px rgba(255, 193, 7, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.3)); }
    50% { filter: drop-shadow(0 0 40px rgba(255, 193, 7, 0.5)); }
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.error-message {
    color: #aaa;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 450px;
    line-height: 1.7;
}

.error-page .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.error-page .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
}

/* SPA 내 에러 페이지 */
.error-page-content {
    min-height: calc(100vh - 250px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
}

.error-page-content .error-code {
    font-size: 8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 50%, #FF5722 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

.error-page-content .error-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.error-page-content .error-message {
    color: #aaa;
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 400px;
    line-height: 1.7;
}

.error-page-content .btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.error-page-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
    .app-container {
        display: block;
    }

    .poster {
        width: 250px;
    }

    .navbar {
        padding: 0.8rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .split-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #222;
        padding: 1rem;
    }

    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .sidebar-item {
        margin-bottom: 0;
    }

    .sidebar-link {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    .sidebar-link::after {
        display: none;
    }

    .sidebar-submenu {
        display: none;
    }

    .row {
        margin: 0 1.5rem 2.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-right .nav-text {
        display: none;
    }

    .main-content {
        margin-top: 4rem;
    }

    .row {
        margin: 0 1rem 2rem;
    }

    .row-title {
        font-size: 1.2rem;
    }

    .poster {
        width: 200px;
    }

    .poster:hover {
        transform: none;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-info {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .search-box.active .search-input {
        width: 150px;
    }

    .content-area {
        padding: 1.5rem;
    }

    .error-code {
        font-size: 6rem;
    }

    .error-title {
        font-size: 1.5rem;
    }

    .error-page .btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .error-page-content .error-code {
        font-size: 6rem;
    }

    .error-page-content .error-title {
        font-size: 1.4rem;
    }
}

/* Small Phone */
@media (max-width: 480px) {
    .poster {
        width: 160px;
    }

    .poster-thumbnail {
        border-radius: 6px;
    }

    .poster-title {
        font-size: 0.85rem;
    }

    .poster-meta {
        font-size: 0.75rem;
    }

    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .row {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }

    .content-area {
        padding: 1rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .error-code {
        font-size: 4.5rem;
    }

    .error-title {
        font-size: 1.3rem;
    }

    .error-message {
        font-size: 1rem;
    }

    .error-page .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .error-page-content .error-code {
        font-size: 4.5rem;
    }

    .error-page-content .error-title {
        font-size: 1.2rem;
    }

    .error-page-content .error-message {
        font-size: 0.95rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .error-code {
        font-size: 4rem;
    }
}

/* ===== POLICY MODAL ===== */
.policy-modal {
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    padding: 2rem;
    overflow-y: auto;
}

.policy-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.policy-content {
    color: #ccc;
    line-height: 1.8;
}

.policy-content h3 {
    color: #fff;
    font-size: 1.05rem;
    margin: 1.5rem 0 0.75rem;
}

.policy-content p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.policy-date {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
    color: #888;
    font-size: 0.9rem;
}

/* ===== SUPPORT MODAL ===== */
.support-modal {
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    padding: 2rem;
    overflow-y: auto;
}

.support-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.support-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.support-tab {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid #444;
    border-radius: 20px;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.support-tab:hover {
    border-color: #666;
    color: #fff;
}

.support-tab.active {
    background: #FFC107;
    border-color: #FFC107;
    color: #000;
    font-weight: 600;
}

.support-tab-content {
    display: none;
}

.support-tab-content.active {
    display: block;
}

.support-modal .form-group {
    margin-bottom: 1.2rem;
}

.support-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.support-modal .form-group input,
.support-modal .form-group select,
.support-modal .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: #222;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.support-modal .form-group input:focus,
.support-modal .form-group select:focus,
.support-modal .form-group textarea:focus {
    outline: none;
    border-color: #FFC107;
}

.support-modal .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Inquiry List */
.inquiry-list {
    max-height: 400px;
    overflow-y: auto;
}

.inquiry-item {
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s;
}

.inquiry-item:hover {
    border-color: #444;
    background: #222;
}

.inquiry-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.inquiry-type {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: #333;
    color: #aaa;
}

.inquiry-type.service { background: #1a4d7c; color: #7cb9e8; }
.inquiry-type.content { background: #4d1a4d; color: #e87ce8; }
.inquiry-type.account { background: #1a4d4d; color: #7ce8e8; }
.inquiry-type.bug { background: #4d1a1a; color: #e87c7c; }
.inquiry-type.suggestion { background: #4d4d1a; color: #e8e87c; }
.inquiry-type.other { background: #333; color: #aaa; }

.inquiry-status {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
}

.inquiry-status.pending { background: #4d3a1a; color: #FFC107; }
.inquiry-status.in_progress { background: #1a3a4d; color: #7cb9e8; }
.inquiry-status.resolved { background: #1a4d2a; color: #7ce87c; }
.inquiry-status.closed { background: #333; color: #888; }

.inquiry-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: #fff;
}

.inquiry-date {
    font-size: 0.8rem;
    color: #666;
}

.inquiry-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

/* Inquiry Detail */
.inquiry-detail {
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.inquiry-detail-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.inquiry-detail-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.inquiry-detail-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.inquiry-detail-content {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.inquiry-reply {
    margin-top: 1rem;
    padding: 1rem;
    background: #222;
    border-radius: 6px;
    border-left: 3px solid #FFC107;
}

.inquiry-reply-header {
    font-size: 0.85rem;
    color: #FFC107;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.inquiry-reply-content {
    color: #ccc;
    line-height: 1.6;
    white-space: pre-wrap;
}

.inquiry-back-btn {
    margin-top: 1rem;
}

/* ===== REPORT MODAL ===== */
#report-modal .modal-content {
    max-width: 500px;
    padding: 2rem;
    background-color: #181818;
}

#report-modal h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
}

/* ===== GENERAL FORM STYLES ===== */
.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: #222 !important;
    border: 1px solid #444 !important;
    border-radius: 6px;
    color: #fff !important;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #FFC107 !important;
}

.form-select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-select option {
    background-color: #222;
    color: #fff;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #666;
}

/* Report Modal Form - Higher Specificity */
#report-modal .form-group {
    margin-bottom: 1.2rem;
}

#report-modal .form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

#report-modal input[type="email"],
#report-modal input[type="url"],
#report-modal select,
#report-modal textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: #222 !important;
    border: 1px solid #444 !important;
    border-radius: 6px;
    color: #fff !important;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
}

#report-modal input[type="email"]:focus,
#report-modal input[type="url"]:focus,
#report-modal select:focus,
#report-modal textarea:focus {
    outline: none;
    border-color: #FFC107 !important;
}

#report-modal textarea {
    resize: vertical;
    min-height: 100px;
}

#report-modal .btn-primary {
    margin-top: 0.5rem;
}
