/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2980b9;
    --secondary-color: #d35400;
    --dark-color: #1a2530;
    --light-color: #2c3e50;
    --text-color: #e0e0e0;
    --hover-color: #3498db;
    --bg-color: #212b36;
    --card-bg: #2c3e50;
    --footer-color: #131920;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1500px;
    margin: 0 200px;
    padding: 0 15px;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--text-color);
}

/* 헤더 스타일 */
header {
    background-color: var(--dark-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    width: 100%;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: color 0.3s;
}

.logo a:hover {
    color: var(--hover-color);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* 히어로 섹션 스타일 */
.hero {
    position: relative;
    height: 90vh;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.4); /* 시작은 어둡게 */
    transition: filter 0.6s ease;
}

.scrolled .hero-bg-video {
    filter: brightness(1); /* 스크롤 후 밝게 */
}

.hero-content {
    max-width: 700px;
    padding: 0 20px;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.hero p {
    font-size: 2.0rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s, transform 0.3s;
}

.cta-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-3px);
}

/* 게임 쇼케이스 */
.games {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.game-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background-color: var(--card-bg);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.game-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.game-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover .game-info {
    opacity: 1;
}

.view-all {
    display: block;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s;
}

.view-all:hover {
    color: var(--hover-color);
}

/* 회사 특징 */
.features {
    padding: 100px 0;
    background-color: var(--light-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature {
    text-align: center;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

/* 커뮤니티 */
.community {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.community-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.update-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #415466;
}

.date {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    flex-direction: column;
}

.social-link {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background-color: var(--card-bg);
    border-radius: 10px;
    transition: background-color 0.3s;
}

.social-link:hover {
    background-color: var(--light-color);
}

.social-link i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--primary-color);
}

/* 채용 */
.careers {
    padding: 100px 0;
    background-color: var(--dark-color);
    color: var(--text-color);
    text-align: center;
}

.careers h2 {
    color: var(--text-color);
}

.careers p {
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.careers .cta-button {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.careers .cta-button:hover {
    background-color: var(--hover-color);
}

/* 푸터 */
footer {
    background-color: var(--footer-color);
    color: var(--text-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #95a5a6;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 10px;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    background-color: var(--primary-color);
}

/* 반응형 */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        height: 100vh;
        top: 80px;
        background-color: var(--dark-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links li {
        margin: 20px 0;
    }

    .burger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .community-content {
        grid-template-columns: 1fr;
    }
}

/* styles.css 파일에 아래 내용 추가 */

/* 헤더 컨테이너 정렬 조정 */
header .container {
    display: flex;
    justify-content: space-between; /* 로고, 네비게이션, 언어선택기를 좌우로 벌림 */
    align-items: center;
    padding: 20px 0;
}

/* 언어 선택기 (드롭다운) 스타일 */
.language-switcher {
    position: relative; /* 드롭다운 메뉴를 absolute로 띄울 기준점 */
    margin-left: 20px; /* 네비게이션과의 간격 */
    z-index: 100; /* 다른 요소 위에 표시 */
}

.language-switcher .lang-toggle {
    background: none;
    border: none;
    color: #fff; /* 텍스트 색상 */
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px; /* 텍스트와 아이콘 사이 간격 */
    transition: background-color 0.3s ease;
}

.language-switcher .lang-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1); /* 호버 시 배경색 변경 */
}

.language-switcher .lang-toggle i {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.language-switcher .lang-toggle[aria-expanded="true"] i {
    transform: rotate(180deg); /* 드롭다운 열리면 아이콘 뒤집기 */
}

.language-switcher .lang-options {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 100%; /* 버튼 바로 아래 위치 */
    right: 0; /* 오른쪽 정렬 */
    background-color: #222; /* 드롭다운 배경색 */
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 120px; /* 최소 너비 */
    display: none; /* 기본적으로 숨김 */
    opacity: 0;
    transform: translateY(10px); /* 살짝 아래로 내려와서 나타나는 효과 */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.language-switcher .lang-options.show {
    display: block; /* JS로 'show' 클래스 추가 시 보이도록 */
    opacity: 1;
    transform: translateY(0);
}

.language-switcher .lang-options li a {
    display: block;
    padding: 10px 15px;
    color: #eee;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.language-switcher .lang-options li a:hover,
.language-switcher .lang-options li a.active { /* 현재 활성화된 언어 */
    background-color: #333;
    color: #fff;
}

/* 모바일 반응형: 햄버거 메뉴 열렸을 때 언어 선택기 처리 */
@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap; /* 요소들이 다음 줄로 넘어갈 수 있도록 허용 */
        justify-content: space-between;
    }

    .language-switcher {
        order: 3; /* 모바일에서 가장 아래로 정렬 */
        width: 100%; /* 전체 너비 차지 */
        text-align: center;
        margin-top: 15px; /* 상단 여백 */
        margin-left: 0; /* 중앙 정렬을 위해 마진 제거 */
    }

    .language-switcher .lang-toggle {
        width: 100%;
        justify-content: center; /* 버튼 내용을 가운데 정렬 */
        background-color: #333; /* 모바일에서는 항상 배경색을 가짐 */
        border: 1px solid #555;
    }
    
    .language-switcher .lang-options {
        position: static; /* 모바일에서는 절대 위치 해제 */
        width: 100%;
        box-shadow: none;
        border-top: 1px solid #555; /* 상단 구분선 */
        border-radius: 0 0 5px 5px; /* 하단만 둥글게 */
    }
}