/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 청바지 패턴 배경 (공통) */
.denim-background {
    background-color: #4a6fa5;
    background-image: 
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,.05) 2px, rgba(255,255,255,.05) 4px),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.05) 2px, rgba(0,0,0,.05) 4px),
        repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0px, transparent 1px, transparent 2px, rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 3px, transparent 3px, transparent 4px),
        linear-gradient(135deg, #4a6fa5 0%, #5b7fb8 25%, #4a6fa5 50%, #3d5f8f 75%, #4a6fa5 100%);
    background-size: 100% 100%, 100% 100%, 8px 8px, 100% 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* 청바지 패턴 배경 */
    background-color: #4a6fa5;
    background-image: 
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,.05) 2px, rgba(255,255,255,.05) 4px),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.05) 2px, rgba(0,0,0,.05) 4px),
        repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0px, transparent 1px, transparent 2px, rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 3px, transparent 3px, transparent 4px),
        linear-gradient(135deg, #4a6fa5 0%, #5b7fb8 25%, #4a6fa5 50%, #3d5f8f 75%, #4a6fa5 100%);
    background-size: 100% 100%, 100% 100%, 8px 8px, 100% 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* 채팅 페이지에서만 overflow hidden 적용 */
.chat-container {
    height: 100vh;
    overflow: hidden;
}

/* 채팅 컨테이너 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 채팅 헤더 */
.chat-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.chat-header h1 i {
    margin-right: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.room-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#current-room {
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

#username-display {
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* 채팅 메시지 영역 */
.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0; /* flexbox에서 스크롤이 제대로 작동하도록 */
    max-height: calc(100vh - 200px); /* 헤더와 입력 영역을 제외한 높이 */
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Firefox용 스크롤바 스타일 */
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

/* 메시지 스타일 */
.message {
    max-width: 70%;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.own-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.other-message {
    align-self: flex-start;
    background: white;
    color: #333;
    padding: 0.75rem 1rem;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.system-message {
    align-self: center;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    text-align: center;
    max-width: 50%;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}

.system-message.join {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #4caf50;
    font-weight: 500;
}

.system-message.join .join-text {
    font-weight: 600;
}

.system-message.leave {
    background: #ffebee;
    color: #c62828;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.sender {
    font-weight: 600;
    font-size: 0.85rem;
}

.time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.message-content {
    line-height: 1.4;
    word-wrap: break-word;
}

/* 입력 영역 */
.chat-input-container {
    padding: 1rem 2rem;
    background: white;
    border-top: 1px solid #e9ecef;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#messageInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#messageInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#messageInput:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* 버튼 스타일 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffb300 0%, #ff6f00 100%);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.room-modal {
    max-width: 600px;
    text-align: left;
}

.room-actions {
    margin-bottom: 1.5rem;
    text-align: center;
}

.room-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 1.5rem;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.room-list::-webkit-scrollbar {
    width: 6px;
}

.room-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.room-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.room-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.room-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.room-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.room-item .room-info h3 {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 1.1rem;
}

.room-item .room-info p {
    margin: 0 0 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
}

.room-item .room-info small {
    color: #888;
    font-size: 0.8rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
}

/* 페이징 스타일 */
.pagination-container {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    text-align: center;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
    margin: 0 1rem;
}

.page-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e9ecef;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 40px;
}

.page-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.page-btn.active:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.modal-content h2 i {
    margin-right: 0.5rem;
    color: #667eea;
}

.modal-content input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-content input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 햄버거 메뉴 스타일 */
.hamburger-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    margin-left: 1rem;
}

.hamburger-menu-btn:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.hamburger-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 햄버거 메뉴 */
.hamburger-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.hamburger-menu.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid #e9ecef;
}

/* 햄버거 메뉴 활성화 상태 */
.hamburger-menu-btn.active span:first-child {
    transform: rotate(45deg);
}

.hamburger-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* 햄버거 메뉴 */
.hamburger-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.hamburger-menu::-webkit-scrollbar {
    width: 6px;
}

.hamburger-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.hamburger-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.hamburger-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.hamburger-menu.open {
    right: 0;
}

.menu-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.menu-content {
    padding: 1rem 0;
}

.menu-section {
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
}

.menu-section h4 {
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: none;
    border: none;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: left;
}

.menu-item:hover {
    background: #f8f9fa;
    color: #667eea;
    transform: translateX(5px);
}

.menu-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
    color: #667eea;
}

.menu-item.logout {
    color: #dc3545;
}

.menu-item.logout:hover {
    background: #ffebee;
    color: #c62828;
}

.menu-item.logout i {
    color: #dc3545;
}

/* 메뉴 오버레이 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    /* 모바일 폰트 크기 조정 */
    html {
        font-size: 14px;
    }
    
    body {
        font-size: 14px;
    }
    .chat-container {
        height: 100vh;
        border-radius: 0;
        max-height: 100vh;
        overflow: hidden;
    }
    
    .chat-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        flex-shrink: 0;
    }
    
    .chat-header h1 {
        font-size: 1.25rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .room-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .chat-messages {
        max-height: calc(100vh - 180px);
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        flex: 1;
    }
    
    .chat-input-container {
        padding: 1rem;
        flex-shrink: 0;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .message {
        max-width: 85%;
    }
    
    .system-message {
        max-width: 90%;
    }
    
    .room-modal {
        max-width: 95%;
        margin: 10% auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .room-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .room-item .room-info {
        width: 100%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-numbers {
        margin: 0;
        justify-content: center;
    }
    
    .page-btn {
        min-width: 35px;
        padding: 0.4rem 0.6rem;
    }
    
    /* 모바일에서 햄버거 메뉴 */
    .hamburger-menu {
        width: 100%;
        right: -100%;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .hamburger-menu.open {
        right: 0;
    }
}

@media (max-width: 480px) {
    /* 작은 모바일 폰트 크기 조정 */
    html {
        font-size: 13px;
    }
    
    body {
        font-size: 13px;
    }
    
    .chat-container {
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
    
    .chat-messages {
        max-height: calc(100vh - 160px);
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        flex: 1;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .chat-header h1 {
        font-size: 1rem;
    }
    
    .message {
        max-width: 95%;
    }
    
    .room-modal {
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .hamburger-menu {
        max-height: 100vh;
        overflow-y: auto;
    }
}

/* 메시지 스타일 */
.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message {
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.join-message {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-align: center;
    font-weight: 500;
    max-width: 100%;
}

.leave-message {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    text-align: center;
    font-weight: 500;
    max-width: 100%;
}

.error-message {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    text-align: center;
    font-weight: 500;
    max-width: 100%;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.message-header .sender {
    font-weight: 600;
    color: #495057;
}

.chat-message .message-header .sender {
    color: #007bff;
}

.message-header .time {
    color: #6c757d;
    font-size: 0.75rem;
}

.message-content {
    line-height: 1.4;
}

.join-message .message-content,
.leave-message .message-content,
.error-message .message-content {
    margin: 0;
}

.error-message .message-content i {
    margin-right: 0.5rem;
}

/* 공통 헤더 스타일 (로그인 화면과 동일) */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* 햄버거 메뉴 버튼 공통 스타일 */
.hamburger-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    width: 30px;
    height: 30px;
    justify-content: center;
    /* Android 등 모바일에서 다른 fixed 요소에 의해 탭이 막히는 문제 방지 */
    position: relative;
    z-index: 2001;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-menu-btn:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.hamburger-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 메인 콘텐츠 하단 패딩 (하단 네비게이션 바를 위한 공간) */
.main,
.main-content,
.container > main {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0) + 2rem);
}

@media (max-width: 768px) {
    .main,
    .main-content,
    .container > main {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0) + 1rem);
    }
}

/* 하단 고정 네비게이션 바 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
    z-index: 100;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    border-radius: 12px;
    min-width: 60px;
    flex: 1;
    max-width: 120px;
}

.nav-item:hover {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
    text-decoration: none;
}

.nav-item.active {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

.nav-item i {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .bottom-nav {
        padding: 0.5rem 0;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
    }
    
    .nav-item {
        padding: 0.4rem 0.5rem;
        min-width: 50px;
    }
    
    .nav-item i {
        font-size: 1.2rem;
    }
    
    .nav-item span {
        font-size: 0.7rem;
    }
    
    .header-content {
        padding: 1rem 1.5rem;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    /* 터치 친화적인 버튼 크기 */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    /* 입력 필드 개선 */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="datetime-local"],
    textarea {
        font-size: 16px; /* iOS 줌 방지 */
        min-height: 44px;
    }
    
    /* 모달 개선 */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 5% auto;
        max-height: 90vh;
        overflow-y: auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.75rem 1rem;
    }
    
    .header h1 {
        font-size: 1.1rem;
    }
    
    .btn {
        min-height: 44px;
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }
    
    .modal-content {
        width: 98%;
        max-width: 98%;
        margin: 2% auto;
        padding: 1rem;
    }
}

/* 태블릿 및 데스크톱 최적화 */
@media (min-width: 769px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .main {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* 큰 화면 최적화 */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .main {
        max-width: 1400px;
    }
}