html { scroll-behavior: smooth; }

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #444;
    line-height: 1.2; 
    margin: 0;
    max-width: 100%;
    overflow-x: hidden;
}

main {
    margin-top: 120px; /* nav(60px) + menu(60px) 높이 */
    padding: 20px;
}

nav {
    position: fixed;
    width: 100%;
    top: 0;
    background: #f2cce0;
    padding: 10px;
    z-index: 2000;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

nav a {
    margin-right: 10px;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: pointer;
    border: 0.8px solid #f8f8f8;
    box-shadow: 0 0 4px rgba(248, 248, 248, 0.3);
    border-radius: 10px;
    padding: 5px;
    font-size: 14px;
    color:#3e385e;
    transition: all 0.1s ease;
}

nav a:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(248, 248, 248, 0.4);
}

nav a.title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3e385e;
    margin-right: 1rem;
    text-decoration: none;
    border: none;
    box-shadow: none;
    position: relative;
    transition: color 0.2s ease;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    margin: 0 -5px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 8px;
    position: fixed;
    top: 60px; /* nav 높이만큼 아래로 */
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu::after {
    content: "▶️";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(235, 193, 215, 0.7);
    font-size: 28px;
    pointer-events: none;
    animation: fadeInOut 1.5s infinite;
    font-weight: bold;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.menu.hide-arrow::after {
    opacity: 0;
    animation: none;
}

@keyframes fadeInOut {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

.menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.menu a {
    margin-right: 0;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: pointer;
    border: 1px solid #ebc1d7;
    box-shadow: 0 2px 4px rgba(235, 193, 215, 0.2);
    transition: all 0.1s ease;
    border-radius: 15px;
    padding: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.menu a:hover {
    background-color: #ebc1d79e;
    color: #444;
    transform: translateY(-0.5px);
    box-shadow: 0 2px 5px rgba(235, 193, 215, 0.3);
}


.title-container{
    padding: 20px;
    text-align: center;
    margin: auto;
}

h1{
    font-size: 1rem;
    margin: 0.2rem auto;
    font-weight: 500;
}

section#heart > h2{
    margin-top: 50px;
}

h2{
    font-size: 1rem;
    font-weight: 400;
    margin: 0.2rem 0;
    text-align: center;
    color: #666;   
}

p{
    font-size: 0.8rem;
    margin: 0.2rem auto;
    font-weight: 400;
}

section {
    margin-top: 100px; /* 메뉴 높이 + 여유 공간 */
    padding-top: 20px;
    scroll-margin-top: 100px; /* 메뉴 높이 + 여유 공간 */
}

#heart, #star, #ribbon, #symbol {
    margin-top: 0;  
    max-width: 40%;
    font-size: 14px;
}

@media screen and (max-width: 1600px) {
    #heart, #star, #ribbon, #symbol {
        max-width: 60%;
    }
}

@media screen and (max-width: 1024px) {
    #heart, #star, #ribbon, #symbol {
        max-width: 90%;
    }
}
@media screen and (max-width: 768px) {
    #heart, #star, #ribbon, #symbol  {
        max-width: 100%;
        font-size: 13px;
    }
    .menu {
        justify-content: flex-start;
        padding-left: 15px;
    }
}

.emoji-list, .special-list, .symbol-list { 
    display: flex; 
    flex-wrap: wrap; 
    margin: 20px auto;
    gap: 15px;
    justify-content: center;
}


.symbol {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
}

.emoji, .special {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: transform 0.2s, background-color 0.2s;
}

.special {
    border: 1px solid #ebc1d7;
    padding: 10px 25px;
    color: #444;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(235, 193, 215, 0.2);
    transition: all 0.1s ease;
}

.special:hover {
    box-shadow: 0 4px 8px rgba(235, 193, 215, 0.3);
    transform: translateY(-2px);
}

.emoji:hover, .special:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}




.toast {
    position: fixed;
    top: 40%;
    left: 50%;
    text-align: center;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

/* 모바일 (320px ~ 480px) */
@media screen and (max-width: 480px) {
    nav a {
        font-size: 12px;
        padding: 4px;
        margin-right: 6px;
    }

    nav a.title {
        font-size: 1.2rem;
    }

    section {
        padding: 10px;
    }

    .emoji {
        padding: 8px;
        font-size: 14px;
    }

    .emoji-list {
        gap: 8px;
    }
}

/* 태블릿 (481px ~ 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    nav a {
        font-size: 13px;
        padding: 6px;
    }

    nav a.title {
        font-size: 1.3rem;
    }

    section {
        padding: 15px;
    }

    .emoji {
        padding: 9px;
    }
}

/* 데스크톱 (769px ~ 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    nav a {
        font-size: 14px;
        padding: 7px;
    }

    nav a.title {
        font-size: 1.4rem;
    }

    section {
        padding: 20px;
        max-width: 900px;
        margin: 40px auto;
    }
}

/* 큰 화면 (1025px 이상) */
@media screen and (min-width: 1025px) {
    nav a {
        font-size: 15px;
        padding: 8px;
    }

    nav a.title {
        font-size: 1.5rem;
    }

    section {
        padding: 25px;
        max-width: 1200px;
        margin: 50px auto;
    }

    .emoji-list {
        gap: 15px;
    }

    .emoji {
        padding: 12px;
    }
}

.footer-content {
    padding: 40px;
    background-color: #f8f8f8;
}

.footer-content h2 {
    font-size: 1rem;
    line-height: 1;
    font-weight: 600;
    margin-bottom: 0;
    margin-top: 1rem;
    font-family: inherit;
    text-align: inherit;
    color: #666;
}

.footer-content p {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.footer-content ul {
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

.footer-content li {
    margin-bottom: 0.5rem;
    line-height: 1;
    font-size: 0.9rem;
}
  



