* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
}

.container {
    display: grid;
    grid-template-areas:
        "header header header"
        "section section section"
        "footer footer footer";
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    gap: 10px;
}

header {
    background: white;
    grid-area: header;
    color: black;
    text-align: center;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 4px 5px 10px rgba(0, 0, 0, 0.4); /* ✅ 살짝 그림자 추가 */
}

/* 네비게이션 메뉴 버튼 */
#menu-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 30px;
}

#navbtn-closed {
    font-size: 30px;
}
/* 네비게이션 기본적으로 숨김 */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 230px;
    height: 100%; /* 자동 높이 설정 그냥 100%로가 깔끔*/
    background: rgba(255, 255, 255, 1); /* ✅ 흰색 + 투명 */
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: 4px 0px 10px rgba(0, 0, 0, 0.4); /* ✅ 살짝 그림자 추가 */

}

/* 네비게이션이 활성화될 때 */
nav.active {
    transform: translateX(0);
}

section {
    grid-area: section;
    padding: 80px 20px 20px 20px; /* 위쪽에 여백 추가 */
}

article {
    background: white;
    margin: 10px 0;
    padding: 15px;
    border: 1px solid #ccc;
}

footer {
    grid-area: footer;
    background: #f0f0f0;
    color: darkgray;
    text-align: center;
    padding: 10px;
}

.navbtn {
    text-align: right   ;
}

 /* 메뉴 스타일 */
 .menu-item {
    position: relative;
    padding: 15px;
    cursor: pointer;
    font-size: 18px;
    border-bottom: 1px solid #ddd;
    transition: background 0.3s;
    background: rgba(255, 255, 255, 0.8);
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* 서브 메뉴 스타일 */
.submenu {
    display: none;
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* 마우스 오버 시 서브 메뉴 표시 */
.menu-item:hover .submenu {
    display: block;
}

/* 서브 메뉴 내부 스타일 */
.submenu p {
    padding: 10px;
    margin: 0;
    cursor: pointer;
    transition: background 0.3s;
}

.submenu p:hover {
    background: rgba(0, 0, 0, 0.1);
}

.midlogo {
    font-size: larger;
}

.share-container {
    position: relative;
    display: inline-block;

    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 30px;
  }
  
  .share-button {
    padding: 10px 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    background-color: white;
    font-size: 20px;
  }
  
  .share-menu {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 10px;
    z-index: 999;
    width: 180px;
  }
  
  .share-menu a,
  .share-menu button {
    display: inline-block;
    margin: 5px 0;
    text-decoration: none;
    color: black;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 20px;

  }
  .share-menu a:hover,
  .share-menu button:hover {
    background-color: #f0f0f0;
  }

  /* 컨테이너 중앙 정렬 */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
}

.modal-image {
    max-width: 80vw;
    max-height: 80vh;
}

.close-modal {
    position: absolute;
    top: -30px;
    right: -30px;
    background: none;
    border: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* 군대 시뮬레이터 스타일 */
.intro-main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #f0f0f0;
}

.intro-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.intro-container h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.intro-container img {
    width: 150px;
    height: 150px;
    margin: 1rem auto;
    border-radius: 50%;
}

.intro-container label {
    display: block;
    margin: 1rem 0 0.5rem;
    color: #666;
}

.intro-container select,
.intro-container input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.intro-container button {
    background-color: #4CAF50;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.intro-container button:hover {
    background-color: #45a049;
}

.chat-main-container {
    display: none;
    height: 100%;
    background-color: #f0f0f0;
}

.chat-main-container.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.image-container {
    margin-bottom: 2rem;
}

.image-container img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.chat-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
}

.chat-box {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.input-container {
    display: flex;
    gap: 1rem;
}

.input-container input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.input-container button {
    background-color: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.input-container button:hover {
    background-color: #45a049;
}

.loader {
    display: none;
}

.loader.active {
    display: inline-block;
}

/* 메시지 스타일 */
.message {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    max-width: 80%;
}

.user-message {
    background-color: #e3f2fd;
    margin-left: auto;
}

.bot-message {
    background-color: #f5f5f5;
    margin-right: auto;
}