* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0f0f0f;
    color: #ffffff;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* 헤더 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 56px;
    background-color: #212121;
    border-bottom: 1px solid #303030;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #00d4ff;
}

.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.search-bar {
    display: flex;
    background-color: #121212;
    border: 1px solid #303030;
    border-radius: 20px;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 16px;
    color: #ffffff;
    font-size: 14px;
}

.search-bar input::placeholder {
    color: #aaaaaa;
}

.search-btn {
    background: none;
    border: none;
    color: #aaaaaa;
    padding: 8px 16px;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
}

.header-icon:hover {
    background-color: #303030;
}

/* 메인 컨테이너 */
.main-container {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 사이드바 */
.sidebar {
    width: 240px;
    background-color: #212121;
    border-right: 1px solid #303030;
    padding: 12px 0;
    position: fixed;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.nav-menu {
    padding: 0 12px;
    margin-bottom: 24px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 12px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 2px;
    font-size: 14px;
}

.nav-item:hover {
    background-color: #303030;
}

.nav-item.active {
    background-color: #303030;
}

.nav-item i {
    width: 24px;
    font-size: 16px;
}

.streamer-section {
    padding: 0 12px;
    margin-bottom: 24px;
}

.streamer-section h3 {
    font-size: 14px;
    color: #aaaaaa;
    margin-bottom: 12px;
    padding: 0 12px;
}

.streamer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
}

.streamer-item:hover {
    background-color: #303030;
}

.streamer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.streamer-info {
    flex: 1;
}

.streamer-name {
    display: block;
    font-size: 14px;
    color: #ffffff;
}

.viewer-count {
    display: block;
    font-size: 12px;
    color: #aaaaaa;
}

.sidebar-footer {
    padding: 0 12px;
    border-top: 1px solid #303030;
    padding-top: 12px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 12px;
    color: #aaaaaa;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 2px;
    font-size: 14px;
}

.footer-item:hover {
    background-color: #303030;
    color: #ffffff;
}

.footer-item i {
    width: 24px;
    font-size: 16px;
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
    max-width: calc(100% - 240px);
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 메인 비디오 섹션 */
.main-video-section {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.video-container {
    flex: 1;
}

.video-player {
    position: relative;
    background-color: #000000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 24px;
}

.video-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.channel-details h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.channel-details p {
    font-size: 14px;
    color: #aaaaaa;
}

.play-btn {
    background-color: rgba(255,255,255,0.2);
    border: none;
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.chat-container {
    width: 340px;
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
}

.chat-header {
    background-color: #303030;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 16px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-content {
    flex: 1;
}

.chat-username {
    font-size: 12px;
    color: #00d4ff;
    font-weight: 500;
    margin-right: 8px;
}

.chat-text {
    font-size: 14px;
    color: #ffffff;
}

/* 게임 카테고리 */
.game-categories {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 24px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.game-categories::-webkit-scrollbar {
    display: none;
}

.category-item {
    position: relative;
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.category-image {
    width: 100%;
    height: 160px;
    max-height: 160px;
    object-fit: cover;
    display: block;
}

.category-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 16px;
}

.live-badge {
    background-color: #ff4444;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    display: inline-block;
}

.category-details p {
    margin-bottom: 4px;
}

.category-time {
    font-size: 12px;
    color: #aaaaaa;
}

.category-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

.category-subtitle {
    font-size: 12px;
    color: #aaaaaa;
}

/* 라이브 스트림 섹션 */
.live-streams-section {
    width: 100%;
    overflow: hidden;
}

.live-streams-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
}

.stream-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
    max-width: 100%;
}

.stream-card:hover {
    transform: translateY(-4px);
}

/* GPU 가속 활성화 */
.stream-card {
    will-change: transform;
    contain: layout style paint;
}

.stream-thumbnail {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.stream-thumbnail img {
    width: 100%;
    height: 157px;
    object-fit: cover;
    display: block;
}

.viewer-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0,0,0,0.8);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.stream-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.stream-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.stream-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.stream-details h4 {
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-details p {
    font-size: 12px;
    color: #aaaaaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 반응형 */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 72px;
    }
    
    .main-content {
        margin-left: 72px;
        max-width: calc(100% - 72px);
    }
    
    .nav-item span,
    .footer-item span {
        display: none;
    }
    
    .streamer-section,
    .sidebar-footer {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        top: 56px !important;
        left: -250px !important;
        width: 240px !important;
        height: calc(100vh - 56px) !important;
        transition: left 0.3s ease !important;
        z-index: 9999 !important;
        background-color: #212121 !important;
        overflow-y: auto !important;
    }
    
    .sidebar.open {
        left: 0 !important;
    }
    
    /* 메뉴 버튼 클릭 영역 확보 */
    .menu-btn {
        position: relative;
        z-index: 10000 !important;
        padding: 10px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    /* 侧边栏打开时的遮罩 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 12px;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .main-video-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .video-container {
        width: 100%;
    }
    
    .video-player {
        aspect-ratio: 16/9;
        min-height: 200px;
    }
    
    .chat-container {
        width: 100%;
        height: 300px;
    }
    
    .chat-messages {
        height: 220px;
    }
    
    .game-categories {
        gap: 12px;
        padding-bottom: 12px;
    }
    
    .category-item {
        min-width: 200px;
    }
    
    .streams-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        width: 100%;
    }
    
    .stream-card {
        border-radius: 8px;
    }
    
    .stream-thumbnail img {
        height: 100px;
    }
    
    .stream-info {
        padding: 8px;
    }
    
    .stream-details h4 {
        font-size: 12px;
    }
    
    .stream-details p {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .stream-avatar {
        width: 24px;
        height: 24px;
    }
    
    /* 头部优화 */
    .header {
        padding: 0 8px;
    }
    
    .header-center {
        margin: 0 8px;
        flex: 1;
        max-width: calc(100vw - 120px); /* iOS Safari 너비 제한 */
    }
    
    .search-bar {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .search-bar input {
        font-size: 16px !important; /* iOS Safari 줌 방지 */
        padding: 8px 12px;
        width: 100%;
        min-width: 0;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 20px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    /* 视频覆盖层优化 */
    .video-overlay {
        padding: 12px;
    }
    
    .channel-details h2 {
        font-size: 14px;
    }
    
    .channel-details p {
        font-size: 12px;
    }
    
    .channel-avatar {
        width: 32px;
        height: 32px;
    }
    
    .play-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* 直播标签 */
    .live-indicator {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    /* 分类标题 */
    .live-streams-section h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }
}

/* 更小屏幕 (手机竖屏) */
@media (max-width: 480px) {
    .header {
        height: 50px;
        padding: 0 8px;
    }
    
    .main-container {
        margin-top: 50px;
    }
    
    .sidebar {
        top: 50px;
        height: calc(100vh - 50px);
    }
    
    .main-content {
        padding: 8px;
    }
    
    .streams-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }
    
    .stream-thumbnail img {
        height: 180px;
    }
    
    .stream-info {
        padding: 10px;
    }
    
    .stream-details h4 {
        font-size: 14px;
    }
    
    .stream-details p {
        font-size: 12px;
    }
    
    .stream-avatar {
        width: 32px;
        height: 32px;
    }
    
    .game-categories {
        gap: 8px;
    }
    
    .category-item {
        min-width: 160px;
    }
    
    .chat-container {
        height: 250px;
    }
    
    .chat-messages {
        height: 180px;
    }
    
    .chat-message {
        padding: 6px 0;
    }
    
    .chat-username {
        font-size: 11px;
    }
    
    .chat-text {
        font-size: 12px;
    }
    
    .video-player {
        min-height: 180px;
    }
    
    .header-icon {
        padding: 6px;
        font-size: 16px;
    }
    
    .header {
        padding: 0 4px;
    }
    
    .header-center {
        margin: 0 4px;
        flex: 1;
        max-width: calc(100vw - 100px); /* 더 작은 화면 대응 */
    }
    
    .search-bar {
        display: flex; /* 작은 화면에서도 검색창 표시 */
        width: 100%;
        max-width: 100%;
    }
    
    .search-bar input {
        font-size: 16px !important; /* iOS Safari 줌 방지 */
        padding: 6px 8px;
        width: 100%;
        min-width: 0;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

/* 채팅 메시지 애니메이션 (성능 최적화) */
.chat-message {
    opacity: 1;
    will-change: opacity;
}

/* 애니메이션 선호 사용자만 적용 */
@media (prefers-reduced-motion: no-preference) {
    .chat-message {
        animation: fadeInUp 0.2s ease-out;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 스트리머 아바타 호버 효과 */
.streamer-avatar {
    transition: transform 0.2s ease;
}

.streamer-avatar:hover {
    transform: scale(1.1);
}

/* 채팅 아바타 호버 효과 */
.chat-avatar {
    transition: transform 0.2s ease;
}

.chat-avatar:hover {
    transform: scale(1.2);
}


/* 슬라이드쇼 스타일 */
.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slideshow .slide.active {
    opacity: 1;
}

/* 슬라이드 인디케이터 */
.slide-indicators {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 15;
}

.slide-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.slide-indicators .indicator.active {
    background: #fff;
    width: 24px;
    border-radius: 5px;
}

.slide-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* 라이브 인디케이터 */
.live-indicator {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: #ff0000;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 비디오 플레이어 위치 조정 */
.video-player {
    position: relative;
}

/* 음소거/음소거 해제 버튼 */
.play-btn.muted i::before {
    content: "\f6a9"; /* volume-mute */
}


/* 모바일 하단 네비게이션 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #212121;
    border-top: 1px solid #303030;
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom, 8px);
    z-index: 1000;
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    font-size: 10px;
    gap: 4px;
    transition: color 0.2s;
}

.mobile-nav a i {
    font-size: 20px;
}

.mobile-nav a.active {
    color: #00d4ff;
}

.mobile-nav a:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
    }
    
    .main-content {
        padding-bottom: 70px;
    }
}

@media (max-width: 480px) {
    .mobile-nav {
        padding: 6px 0;
    }
    
    .mobile-nav a {
        font-size: 9px;
    }
    
    .mobile-nav a i {
        font-size: 18px;
    }
    
    .main-content {
        padding-bottom: 60px;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .stream-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .nav-item:active,
    .mobile-nav-item:active {
        background-color: #404040;
    }
    
    .play-btn:active {
        transform: scale(0.95);
    }
}


/* 모바일 모달 반응형 */
@media (max-width: 768px) {
    .auth-content {
        width: 95% !important;
        max-width: 100% !important;
        max-height: 90vh !important;
        height: auto !important;
        padding: 20px !important;
        margin: 10px;
        overflow-y: auto;
    }
    
    .auth-content h2 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    .auth-content h3 {
        font-size: 16px !important;
    }
    
    .auth-content input,
    .auth-content select,
    .auth-content button {
        font-size: 14px !important;
        padding: 10px !important;
    }
}

@media (max-width: 480px) {
    .auth-content {
        width: 100% !important;
        max-height: 85vh !important;
        border-radius: 12px 12px 0 0 !important;
        margin: 0;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
}

/* 로그인/회원가입 모달 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100vh;
    height: -webkit-fill-available;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.auth-modal.active {
    display: flex;
}

.auth-content {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    margin: auto;
}

.auth-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
}

.auth-close:hover {
    color: #fff;
}

.auth-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #00d4ff;
}

.auth-input {
    display: flex;
    align-items: center;
    background: #0f0f23;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 0 15px;
}

.auth-input i {
    color: #666;
    width: 20px;
}

.auth-input input {
    flex: 1;
    background: none;
    border: none;
    padding: 15px 10px;
    color: #fff;
    font-size: 14px;
}

.auth-input input::placeholder {
    color: #666;
}

.auth-input:focus-within {
    border-color: #00d4ff;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}

.auth-switch a {
    color: #00d4ff;
    text-decoration: none;
}

/* 유저 드롭다운 */
.user-dropdown {
    position: absolute;
    top: 56px;
    right: 10px;
    background: #212121;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    min-width: 150px;
    z-index: 1001;
}

.user-dropdown span {
    display: block;
    color: #00d4ff;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.user-dropdown button {
    width: 100%;
    padding: 10px;
    background: #e74c3c;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
}

.user-dropdown button:hover {
    background: #c0392b;
}


/* 마이페이지 스타일 */
.mypage-info {
    background: #0f0f23;
    border-radius: 10px;
    padding: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #333;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span:first-child {
    color: #888;
}

.info-row span:last-child {
    color: #fff;
    font-weight: 500;
}

.info-row.highlight {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 204, 0.1) 100%);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.info-row.highlight span:last-child {
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
}

.exchange-item {
    background: #0f0f23;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #27ae60;
}

.exchange-item.pending {
    border-left-color: #f39c12;
}

.exchange-item.rejected {
    border-left-color: #e74c3c;
}

.exchange-item p {
    margin: 5px 0;
    font-size: 13px;
    color: #aaa;
}

.exchange-item .amount {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.exchange-item .status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.status-pending { background: #f39c12; color: #fff; }
.status-approved { background: #27ae60; color: #fff; }
.status-rejected { background: #e74c3c; color: #fff; }


/* 간단한 아이템샵 스타일 */
.simple-shop-content {
    max-width: 500px;
    background: #2c3e50;
    border-radius: 15px;
    padding: 0;
}

.simple-header {
    background: #3498db;
    padding: 20px;
    text-align: center;
    color: white;
    border-radius: 15px 15px 0 0;
}

.simple-header h2 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.simple-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.simple-grade-list {
    padding: 20px;
}

.simple-grade-item {
    display: flex;
    flex-direction: column;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.simple-grade-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.3);
}

.grade-content {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.silver-grade { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }
.gold-grade { background: linear-gradient(135deg, #f39c12, #e67e22); }
.diamond-grade { background: linear-gradient(135deg, #3498db, #2980b9); }
.vip-grade { background: linear-gradient(135deg, #9b59b6, #8e44ad); }

.grade-icon {
    font-size: 30px;
    margin-right: 15px;
}

.grade-details {
    flex: 1;
    color: white;
}

.grade-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.grade-desc {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.grade-price {
    font-size: 18px;
    font-weight: bold;
}

.grade-buttons {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.grade-buy-btn {
    width: 100%;
    padding: 18px 25px;
    border: none;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    text-transform: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.silver-btn { 
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: 0 5px 20px rgba(149, 165, 166, 0.4);
}
.gold-btn { 
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.4);
}
.diamond-btn { 
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}
.vip-btn { 
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.4);
}

.grade-buy-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.grade-buy-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.grade-buy-btn i {
    font-size: 18px;
}

.simple-footer {
    background: #1a252f;
    padding: 15px;
    text-align: center;
    border-radius: 0 0 15px 15px;
}

.simple-footer p {
    color: #f39c12;
    margin: 2px 0;
    font-size: 11px;
}

/* 간단한 포인트 충전 스타일 */
.simple-charge-content {
    max-width: 400px;
    background: #2c3e50;
    border-radius: 15px;
    padding: 0;
}

.current-points-simple {
    background: #1a252f;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.points-display {
    color: #f1c40f;
    font-size: 16px;
    font-weight: bold;
}

.charge-list {
    padding: 20px;
}

.charge-item-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.charge-item-simple:hover {
    background: linear-gradient(135deg, #3e5266 0%, #34495e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border-color: rgba(243, 156, 18, 0.3);
}

.charge-item-simple.selected {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-color: #f39c12;
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.4);
}

.charge-amount {
    font-weight: 600;
}

.charge-price {
    color: #f39c12;
    font-weight: bold;
}

.charge-item-simple.selected .charge-price {
    color: white;
}

.custom-input-simple {
    margin: 0 20px 20px 20px;
    background: #1a252f;
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-input-simple i {
    color: #f39c12;
}

.custom-input-simple input {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    flex: 1;
    outline: none;
}

.custom-input-simple input::placeholder {
    color: #7f8c8d;
}

.charge-btn-simple {
    margin: 20px 20px 20px 20px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 18px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: calc(100% - 40px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.charge-btn-simple:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(243, 156, 18, 0.5);
}

.charge-btn-simple:active {
    transform: translateY(-1px);
}

/* 고객센터 스타일 */
.tab-btn {
    padding: 10px 20px;
    background: #16213e;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #1a2a4e;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#support-write .form-group textarea {
    font-family: inherit;
}

#my-support-list::-webkit-scrollbar {
    width: 6px;
}

#my-support-list::-webkit-scrollbar-track {
    background: #0f0f23;
}

#my-support-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

/* 모바일 슬라이더 표시 (최소 수정) */
@media (max-width: 768px) {
    .game-categories {
        display: flex !important;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .game-categories {
        display: flex !important;
        margin-bottom: 16px;
    }
}
/* 아이템샵 & 포인트 충전 모바일 최적화 */
@media (max-width: 768px) {
    .shop-items {
        gap: 10px;
    }
    
    .shop-item {
        padding: 12px;
        gap: 12px;
    }
    
    .item-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .item-info h4 {
        font-size: 14px;
    }
    
    .item-info p {
        font-size: 11px;
    }
    
    .item-price {
        font-size: 14px;
    }
    
    .charge-options {
        gap: 8px;
    }
    
    .charge-item {
        padding: 12px 15px;
    }
    
    .charge-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .shop-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .item-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 10px;
    }
    
    .item-info {
        margin-bottom: 10px;
    }
    
    .item-price {
        font-size: 16px;
        font-weight: bold;
    }
    
    .charge-item {
        padding: 15px;
        border-radius: 10px;
    }
}


/* ==================== 아이템샵 전용 스타일 ==================== */
#itemshop-modal .itemshop-container {
    background: #1a1a2e !important;
    padding: 0 !important;
    border-radius: 16px !important;
    width: 90% !important;
    max-width: 500px !important;
    position: relative !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

#itemshop-modal .itemshop-close {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    background: none !important;
    border: none !important;
    color: #888 !important;
    font-size: 28px !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

#itemshop-modal .itemshop-header {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    padding: 25px !important;
    text-align: center !important;
    border-radius: 16px 16px 0 0 !important;
}

#itemshop-modal .itemshop-header h2 {
    margin: 0 !important;
    color: white !important;
    font-size: 22px !important;
}

#itemshop-modal .itemshop-header p {
    margin: 10px 0 0 !important;
    color: rgba(255,255,255,0.9) !important;
    font-size: 14px !important;
}

#itemshop-modal .itemshop-body {
    padding: 20px !important;
}

#itemshop-modal .grade-card {
    padding: 20px !important;
    margin-bottom: 15px !important;
    border-radius: 12px !important;
}

#itemshop-modal .grade-card.silver {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
}

#itemshop-modal .grade-card.gold {
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
}

#itemshop-modal .grade-card.diamond {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
}

#itemshop-modal .grade-card.vip {
    background: linear-gradient(135deg, #9b59b6, #8e44ad) !important;
}

#itemshop-modal .grade-info {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 15px !important;
}

#itemshop-modal .grade-icon {
    font-size: 35px !important;
    margin-right: 15px !important;
}

#itemshop-modal .grade-details {
    flex: 1 !important;
    color: white !important;
}

#itemshop-modal .grade-name {
    font-size: 18px !important;
    font-weight: bold !important;
    color: white !important;
}

#itemshop-modal .grade-desc {
    font-size: 13px !important;
    opacity: 0.9 !important;
    color: white !important;
}

#itemshop-modal .grade-price {
    font-size: 20px !important;
    font-weight: bold !important;
    margin-top: 5px !important;
    color: white !important;
}

#itemshop-modal .buy-btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 50px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 30px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    text-align: center !important;
    line-height: 50px !important;
}

#itemshop-modal .buy-btn.silver-btn {
    background: #667eea !important;
}

#itemshop-modal .buy-btn.gold-btn {
    background: #c0392b !important;
}

#itemshop-modal .buy-btn.diamond-btn {
    background: #1a5276 !important;
}

#itemshop-modal .buy-btn.vip-btn {
    background: #6c3483 !important;
}

#itemshop-modal .buy-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
}

#itemshop-modal .itemshop-footer {
    background: #0f0f23 !important;
    padding: 15px !important;
    text-align: center !important;
    border-radius: 0 0 16px 16px !important;
}

#itemshop-modal .itemshop-footer p {
    margin: 0 !important;
    color: #f39c12 !important;
    font-size: 12px !important;
}

#itemshop-modal .itemshop-footer p + p {
    margin-top: 5px !important;
}
