* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

body {
    font-family: 'Pretendard', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Navbar 스타일 */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(51, 51, 51, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: none;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 30px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo a {
    text-decoration: none; color: white;
}

.nav-items {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-item:last-child {
    margin-left: auto;
    margin-right: 70px;
}

.language-btn svg {
    display: block;
    color: white;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.language-btn:hover svg {
    color: #667eea;
    transform: scale(1.1);
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    height: 100%;
    line-height: 1;
    white-space: nowrap;
    margin-top: 0;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
    transform: translateY(-2px);
    background: rgba(102, 126, 234, 0.1);
    border-radius: 5px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(51, 51, 51, 0.99);
    min-width: 170px;
    box-shadow: none;
    border-top: 3px solid #667eea;
    border-radius: 0 0 12px 12px;
    animation: slideDown 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 8px 0;
    margin-top: 10px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: block;
    color: #e0e0e0;
    padding: 12px 24px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
    padding-left: 30px;
    color: #667eea;
    transform: translateX(5px);
}

/* 서브메뉴 */
.dropdown-submenu {
    position: relative;
}

.submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: rgba(51, 51, 51, 0.99);
    min-width: 160px;
    border-left: 3px solid #667eea;
    border-radius: 0 12px 12px 0;
    animation: slideDown 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 8px 0;
    z-index: 1001;
}

.submenu.active {
    display: block;
}

.submenu .dropdown-item {
    font-size: 13px;
    padding: 10px 20px;
}

/* 이미지 변환기 */
.imgconv-header {
    text-align: center;
    margin-bottom: 25px;
}

.imgconv-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.imgconv-privacy-notice {
    font-size: 0.85em;
    color: #888;
    margin-top: 10px;
}

.imgconv-upload-area {
    border: 2px dashed rgba(102, 126, 234, 0.4);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.imgconv-upload-area:hover,
.imgconv-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.imgconv-upload-area .upload-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.imgconv-upload-area .upload-label {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}

.imgconv-upload-area .upload-label:hover {
    transform: scale(1.05);
}

.imgconv-upload-area .upload-hint {
    color: #888;
    font-size: 0.9em;
    margin-top: 10px;
}

.imgconv-preview {
    text-align: center;
    margin: 15px 0;
}

.imgconv-controls {
    text-align: center;
    margin: 20px 0;
}

.imgconv-action-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.imgconv-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.imgconv-result {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
}

.imgconv-result h4 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.imgconv-result p {
    margin: 10px 0;
    color: #ccc;
}

.imgconv-download-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 10px;
    transition: transform 0.2s;
}

.imgconv-download-btn:hover {
    transform: translateY(-2px);
}

/* 메뉴 토글 버튼 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    color: #667eea;
    transform: scale(1.1);
}

/* 메인 컨텐츠 */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 50px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1, h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 700;
}

h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 700;
}

h4 {
    color: #667eea;
    margin: 15px 0;
    font-size: 1.1em;
    font-weight: 600;
}

p {
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
}

/* 소개 섹션 */
.intro-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.intro-header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-header p {
    font-size: 1.2em;
    color: #764ba2;
    font-weight: 500;
}

/* Tools 섹션 */
.tool-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4ff 100%);
    border-left: 5px solid #667eea;
    padding: 35px;
    margin: 30px 0;
    border-radius: 15px;
    box-shadow: none;
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
}

.tool-box:hover {
    box-shadow: none;
    transform: translateY(-3px);
}

input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    margin: 12px 0;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

.tool-box button {
    margin-top: 15px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: none;
}

button:active {
    transform: translateY(-1px);
}

.result-box {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0e8ff 100%);
    padding: 20px;
    margin-top: 25px;
    border-radius: 12px;
    border-left: 5px solid #667eea;
    display: none;
    box-shadow: none;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.result-box.show {
    display: block;
    animation: slideInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-text {
    font-size: 1.3em;
    font-weight: 600;
    color: #667eea;
    word-break: break-all;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 2px solid #667eea;
    line-height: 1.6;
}

.game-item {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    padding: 20px;
    margin: 15px 0;
    border-radius: 12px;
    border-left: 5px solid #ffc107;
    box-shadow: none;
    border: 1px solid rgba(255, 193, 7, 0.2);
    transition: all 0.3s ease;
}

.game-item:hover {
    transform: translateX(5px);
    box-shadow: none;
}

.game-item strong {
    color: #ff9800;
    font-size: 1.2em;
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

.game-item p {
    margin: 10px 0;
    color: #555;
    font-size: 0.98em;
    line-height: 1.6;
}

.game-item small {
    color: #999;
    font-size: 0.85em;
    display: block;
    margin-top: 10px;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 50px;
    font-weight: 500;
}

footer p {
    color: white;
}

.copy-btn {
    margin-left: 12px;
    padding: 10px 18px;
    font-size: 13px;
    margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.button-group button {
    flex: 1;
    margin: 0;
}

label {
    display: block;
    margin-top: 18px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #333;
    font-size: 0.95em;
}

#game-setup {
    margin-bottom: 25px;
}

.question-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f4f8 100%);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: none;
    border: 2px solid rgba(102, 126, 234, 0.2);
    animation: slideInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.question-box h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.15em;
}

.answer-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.answer-btn {
    padding: 12px 16px;
    font-size: 13px;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    white-space: normal;
    line-height: 1.4;
    border-radius: 10px;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.answer-btn:hover {
    transform: translateY(-4px);
    box-shadow: none;
}

.answer-btn:active {
    transform: translateY(-2px);
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}

/* ====== 태블릿 반응형 (768px ~ 1024px) ====== */
@media (max-width: 1024px) {
    .container {
        margin: 30px 20px;
        padding: 35px 25px;
    }

    .intro-header h1 {
        font-size: 2.3em;
    }

    .tool-box {
        padding: 25px;
    }

    .navbar {
        height: 65px;
        padding: 0 25px;
    }

    .nav-link {
        padding: 0 15px;
        font-size: 14px;
    }
}

/* ====== 태블릿 가로 (768px ~ 960px) ====== */
@media (max-width: 960px) {
    .navbar {
        height: 60px;
        padding: 0 20px;
    }

    .logo {
        font-size: 24px;
    }

    .nav-items {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(51, 51, 51, 0.99);
        flex-direction: column;
        gap: 0;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }

    .nav-items.active {
        display: flex;
        max-height: 500px;
        overflow-y: auto;
    }

    .nav-item {
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    }

    .nav-link {
        padding: 15px 20px;
        width: 100%;
        justify-content: flex-start;
    }

    .menu-toggle {
        display: block;
    }

    .dropdown-menu {
        position: static;
        min-width: unset;
        width: 100%;
        border-top: none;
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        background: rgba(40, 40, 40, 0.99);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown-menu.active {
        max-height: 300px;
        overflow-y: auto;
    }

    .dropdown-item {
        padding: 12px 40px;
    }

    .submenu {
        position: static;
        left: auto;
        border-left: none;
        border-top: 1px solid rgba(102, 126, 234, 0.2);
        border-radius: 0;
        background: rgba(30, 30, 30, 0.99);
        min-width: unset;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }

    .submenu.active {
        max-height: 500px;
    }

    .submenu .dropdown-item {
        padding: 10px 55px;
    }

    .dropdown-menu.active {
        max-height: 800px;
    }

    .container {
        margin: 20px;
        padding: 25px 20px;
    }

    .intro-header h1 {
        font-size: 2em;
    }

    .intro-header p {
        font-size: 1em;
    }

    .tool-box {
        padding: 20px;
        margin: 20px 0;
    }

    .answer-buttons {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 10px;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    .button-group button {
        width: 100%;
    }

    h3 {
        font-size: 1.3em;
    }

    .copy-btn {
        margin-left: 8px;
        padding: 8px 14px;
        font-size: 12px;
    }

    footer {
        padding: 20px;
        font-size: 14px;
    }
}

/* ====== 휴대폰 세로 (480px ~ 768px) ====== */
@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .navbar {
        height: 56px;
        padding: 0 16px;
    }

    .logo {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .nav-items {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(51, 51, 51, 0.99);
        flex-direction: column;
        gap: 0;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }

    .nav-items.active {
        display: flex;
        max-height: 100vh;
        overflow-y: auto;
    }

    .nav-item {
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    }

    .nav-link {
        padding: 14px 18px;
        width: 100%;
        justify-content: flex-start;
        font-size: 13px;
    }

    .menu-toggle {
        display: block;
    }

    .dropdown-menu {
        position: static;
        min-width: unset;
        width: 100%;
        border-top: none;
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        background: rgba(40, 40, 40, 0.99);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown-menu.active {
        max-height: 300px;
        overflow-y: auto;
    }

    .dropdown-item {
        padding: 12px 40px;
        font-size: 13px;
    }

    .submenu {
        position: static;
        left: auto;
        border-left: none;
        border-top: 1px solid rgba(102, 126, 234, 0.2);
        border-radius: 0;
        background: rgba(30, 30, 30, 0.99);
        min-width: unset;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }

    .submenu.active {
        max-height: 500px;
    }

    .submenu .dropdown-item {
        padding: 10px 55px;
        font-size: 12px;
    }

    .dropdown-menu.active {
        max-height: 800px;
    }

    .container {
        margin: 16px;
        padding: 20px 16px;
        border-radius: 16px;
    }

    .intro-header {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }

    .intro-header h1 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    .intro-header p {
        font-size: 0.95em;
    }

    p {
        font-size: 0.95em;
        line-height: 1.6;
    }

    h3 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }

    h4 {
        font-size: 1em;
        margin: 12px 0;
    }

    .tool-box {
        padding: 18px;
        margin: 16px 0;
        border-left-width: 4px;
    }

    .tool-box:hover {
        transform: translateY(-2px);
    }

    input, textarea, select {
        padding: 12px 14px;
        margin: 10px 0;
        font-size: 16px;
        border-radius: 8px;
    }

    button {
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 8px;
    }

    .tool-box button {
        margin-top: 12px;
        width: 100%;
    }

    .result-box {
        padding: 16px;
        margin-top: 16px;
        border-radius: 10px;
        border-left-width: 4px;
    }

    .result-text {
        font-size: 1.1em;
        padding: 14px;
    }

    .game-item {
        padding: 16px;
        margin: 12px 0;
        border-left-width: 4px;
    }

    .game-item strong {
        font-size: 1.1em;
        margin-bottom: 8px;
    }

    .game-item p {
        font-size: 0.93em;
    }

    .game-item small {
        font-size: 0.8em;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
    }

    .button-group button {
        width: 100%;
        margin: 0;
    }

    label {
        margin-top: 14px;
        margin-bottom: 6px;
        font-size: 0.9em;
    }

    #game-setup {
        margin-bottom: 18px;
    }

    .question-box {
        padding: 18px;
        margin-top: 16px;
        border-radius: 10px;
    }

    .question-box h4 {
        margin-bottom: 16px;
        font-size: 1.05em;
    }

    .answer-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .answer-btn {
        padding: 11px 14px;
        font-size: 12px;
        line-height: 1.3;
        border-radius: 8px;
    }

    .copy-btn {
        margin-left: 8px;
        padding: 10px 16px;
        font-size: 12px;
        margin-top: 10px;
        width: auto;
    }

    footer {
        padding: 20px;
        margin-top: 30px;
        font-size: 12px;
    }
}

/* ====== 소형 휴대폰 (최대 480px) ====== */
@media (max-width: 480px) {
    .navbar {
        height: 52px;
        padding: 0 12px;
    }

    .logo {
        font-size: 18px;
    }

    .menu-toggle {
        font-size: 24px;
    }

    .container {
        margin: 12px;
        padding: 16px 14px;
    }

    .intro-header h1 {
        font-size: 1.6em;
    }

    .intro-header p {
        font-size: 0.9em;
    }

    p {
        font-size: 0.9em;
    }

    h3 {
        font-size: 1.1em;
    }

    .tool-box {
        padding: 16px;
        margin: 14px 0;
    }

    input, textarea, select {
        padding: 11px 12px;
        font-size: 16px;
    }

    button {
        padding: 11px 20px;
        font-size: 13px;
    }

    .result-text {
        font-size: 1em;
        padding: 12px;
    }

    .answer-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .answer-btn {
        padding: 10px 12px;
        font-size: 11px;
    }

    .game-item {
        padding: 14px;
        margin: 10px 0;
    }

    .game-item strong {
        font-size: 1em;
    }

    footer {
        padding: 16px;
        font-size: 11px;
    }

    .nav-items {
        top: 52px;
    }
}

/* 햄버거 버튼 (데스크톱에서는 숨김) */
.hamburger-btn {
    display: none;
}

/* 모바일/태블릿에서 햄버거 버튼 보이기 */
@media (max-width: 960px) {
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 28px;
        height: 22px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }
    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
}

/* 햄버거 버튼 애니메이션 */
.hamburger-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* BMI 계산기 스타일 */
.bmi-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
}

.input-wrapper label {
    margin-bottom: 8px;
    font-size: 0.9em;
}

.bmi-value {
    text-align: center;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.bmi-value .label {
    display: block;
    font-size: 0.95em;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.bmi-value .value {
    display: block;
    font-size: 3em;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 5px;
}

.bmi-category {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2em;
}

/* 한국 기준 색상 */
.bmi-category.underweight {
    background: linear-gradient(135deg, #5dade2 0%, #2e86de 100%);
    color: white;
}

.bmi-category.normal {
    background: linear-gradient(135deg, #58d68d 0%, #27ae60 100%);
    color: white;
}

.bmi-category.overweight {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
}

.bmi-category.obese-level1 {
    background: linear-gradient(135deg, #fab1a0 0%, #e17055 100%);
    color: white;
}

.bmi-category.obese-level2 {
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
    color: white;
}

.bmi-category.obese-level3 {
    background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
    color: white;
}

.category-icon {
    font-size: 1.3em;
}

.bmi-info {
    background: rgba(102, 126, 234, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.bmi-info p {
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.bmi-range {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}

.range-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

.range-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.range-label {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.range-value {
    display: block;
    color: #667eea;
    font-weight: 600;
    font-size: 0.9em;
}

/* 반응형 BMI 계산기 */
@media (max-width: 768px) {
    .bmi-input-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .bmi-value .value {
        font-size: 2.5em;
    }

    .bmi-category {
        font-size: 1.1em;
    }

    .bmi-range {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .range-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .bmi-input-group {
        gap: 12px;
    }

    .bmi-value {
        padding: 15px;
    }

    .bmi-value .value {
        font-size: 2em;
    }

    .bmi-category {
        font-size: 1em;
        gap: 8px;
    }

    .category-icon {
        font-size: 1.1em;
    }

    .bmi-info {
        padding: 15px;
    }

    .bmi-info p {
        font-size: 0.9em;
    }

    .bmi-range {
        grid-template-columns: 1fr;
    }

    .range-item {
        padding: 10px;
    }
}

/* BMI 출처 링크 */
.bmi-source {
    background: rgba(102, 126, 234, 0.08);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 0.9em;
    margin: 15px 0;
}

.bmi-source a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bmi-source a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 반응형 출처 링크 */
@media (max-width: 768px) {
    .bmi-source {
        font-size: 0.85em;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .bmi-source {
        font-size: 0.8em;
        padding: 10px 12px;
    }
}

/* 랜덤 이름 생성기 스타일 */
.nickname-controls {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nickname-controls label {
    font-weight: 700;
    color: #333;
    font-size: 0.95em;
}

.nickname-controls select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nickname-controls select:hover {
    border-color: #667eea;
}

.nickname-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

.nickname-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.nickname-display .result-text {
    flex: 1;
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    padding: 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    text-align: center;
}

.nickname-display .copy-btn {
    padding: 12px 20px;
    white-space: nowrap;
    margin: 0;
}

.nickname-info {
    background: rgba(102, 126, 234, 0.08);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    text-align: center;
}

.nickname-info p {
    margin: 0;
    color: #555;
    font-size: 0.9em;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .nickname-display {
        flex-direction: column;
        gap: 10px;
    }

    .nickname-display .result-text {
        width: 100%;
        font-size: 1.8em;
    }

    .nickname-display .copy-btn {
        width: 100%;
    }

    .nickname-controls select {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nickname-display .result-text {
        font-size: 1.5em;
        padding: 15px;
    }

    .nickname-controls {
        gap: 8px;
    }

    .nickname-controls select {
        padding: 10px 12px;
        font-size: 12px;
    }

    .nickname-info p {
        font-size: 0.85em;
    }
}

/* 닉네임 설정 스타일 */
.nickname-settings {
    margin: 20px 0;
    padding: 20px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.setting-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-weight: 700;
    color: #333;
    font-size: 0.9em;
}

.setting-item select {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.setting-item select:hover {
    border-color: #667eea;
}

.setting-item select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nickname-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.nickname-display .result-text {
    flex: 1;
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
    padding: 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    text-align: center;
}

.nickname-display .copy-btn {
    padding: 12px 20px;
    white-space: nowrap;
    margin: 0;
}

.nickname-info {
    background: rgba(102, 126, 234, 0.08);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    text-align: center;
}

.nickname-info p {
    margin: 0;
    color: #555;
    font-size: 0.9em;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .setting-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .nickname-display {
        flex-direction: column;
        gap: 10px;
    }

    .nickname-display .result-text {
        width: 100%;
        font-size: 2em;
    }

    .nickname-display .copy-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nickname-settings {
        padding: 15px;
    }

    .setting-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .setting-item select {
        font-size: 12px;
        padding: 9px 10px;
    }

    .nickname-display .result-text {
        font-size: 1.8em;
        padding: 15px;
    }

    .nickname-info p {
        font-size: 0.85em;
    }
}

/* 닉네임 설정 스타일 */
.nickname-settings {
    margin: 20px 0;
    padding: 20px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.setting-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.setting-divider {
    height: 1px;
    background: rgba(102, 126, 234, 0.2);
    margin: 15px 0;
    grid-column: 1 / -1;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-weight: 700;
    color: #333;
    font-size: 0.9em;
}

.setting-item select {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.setting-item select:hover {
    border-color: #667eea;
}

.setting-item select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nickname-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.nickname-display .result-text {
    flex: 1;
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
    padding: 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    text-align: center;
}

.nickname-display .copy-btn {
    padding: 12px 20px;
    white-space: nowrap;
    margin: 0;
}

.nickname-info {
    background: rgba(102, 126, 234, 0.08);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    text-align: center;
}

.nickname-info p {
    margin: 0;
    color: #555;
    font-size: 0.9em;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .setting-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .nickname-display {
        flex-direction: column;
        gap: 10px;
    }

    .nickname-display .result-text {
        width: 100%;
        font-size: 2em;
    }

    .nickname-display .copy-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nickname-settings {
        padding: 15px;
    }

    .setting-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .setting-item select {
        font-size: 12px;
        padding: 9px 10px;
    }

    .nickname-display .result-text {
        font-size: 1.8em;
        padding: 15px;
    }

    .nickname-info p {
        font-size: 0.85em;
    }
}

/* input 필드 스타일 */
.setting-item input {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
    text-align: center;
    font-weight: 600;
}

.setting-item input:hover {
    border-color: #667eea;
}

.setting-item input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-item input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* copylight */
.copylight {
    color: white;
}

/* Background Remover */
.bgremover-tool-box {
    text-align: center;
}

.bgremover-header {
    margin-bottom: 25px;
}

.bgremover-header .bgremover-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.bgremover-header h3 {
    font-size: 1.6em;
    margin-bottom: 8px;
}

.bgremover-header p {
    color: #777;
    font-size: 15px;
}

.bgremover-privacy-notice {
    margin-top: 10px;
    font-size: 13px;
    color: #888;
    background: rgba(102, 126, 234, 0.06);
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
}

.bgremover-upload-area {
    margin: 25px auto;
    text-align: center;
    border: 3px dashed #b8c6ff;
    border-radius: 16px;
    padding: 40px 20px;
    background: rgba(102, 126, 234, 0.04);
    transition: all 0.3s ease;
    max-width: 500px;
}

.bgremover-upload-area:hover,
.bgremover-upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.bgremover-upload-area .upload-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.upload-label {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.upload-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.upload-hint {
    margin-top: 12px;
    color: #999;
    font-size: 13px;
}

.bgremover-preview {
    margin: 20px 0;
    text-align: center;
}

.bgremover-controls {
    margin: 20px 0;
    text-align: center;
}

.mode-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-option {
    cursor: pointer;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-label {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-weight: 500;
    color: #555;
    background: #fff;
    transition: all 0.3s ease;
}

.mode-option input[type="radio"]:checked + .mode-label {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    font-weight: 600;
}

.bgremover-action-btn {
    font-size: 16px;
    padding: 14px 36px;
}

.bgremover-loading-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.3s ease;
}

.loading-spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 5px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.bgremover-loading-modal-content p {
    margin-top: 16px;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.tolerance-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tolerance-group label {
    font-weight: 600;
    color: #555;
}

.tolerance-group input[type="range"] {
    width: 200px;
    accent-color: #667eea;
}

.tolerance-group span {
    min-width: 30px;
    font-weight: 700;
    color: #667eea;
}

/* 결과 팝업 모달 */
.bgremover-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.bgremover-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.bgremover-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    box-shadow: none;
}

.bgremover-modal-close:hover {
    color: #333;
    transform: none;
    box-shadow: none;
}

.bgremover-modal-title {
    text-align: center;
    font-size: 1.4em;
    margin-bottom: 20px;
    color: #333;
}

.bgremover-modal-canvas-wrap {
    text-align: center;
    margin-bottom: 20px;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #fff 0% 50%) 50% / 20px 20px;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid #eee;
}

.bgremover-modal-canvas-wrap canvas {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.bgremover-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bgremover-download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.bgremover-close-btn {
    background: #f0f0f0;
    color: #555;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.bgremover-close-btn:hover {
    background: #e0e0e0;
}

@media (max-width: 480px) {
    .bgremover-upload-area {
        padding: 25px 15px;
    }
    .bgremover-modal-content {
        padding: 20px 15px;
        border-radius: 14px;
    }
    .mode-group {
        flex-direction: column;
        align-items: center;
    }
}
}