@font-face {
    font-family: 'KartriderBold';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2312-1@1.1/KartriderBold.woff2') format('woff2');
    font-style: normal;
}

:root {
    --primary: #4A90E2;
    --secondary: #2B6CB0;
    --accent: #7F9CF5;
    --background: #F0F4F8;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #2D3748;
    --hover: #EDF2F7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    background: linear-gradient(-45deg, #599fee, #6f8ee9, #53a3dc, #3954cb);
    background-size: 400% 400%;
    background-attachment: fixed;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    height: 100%;
    background: linear-gradient(-45deg, #599fee, #6f8ee9, #53a3dc, #3954cb);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: gradientBG 15s ease infinite;
    color: var(--text);
    position: relative;
    overflow-x: hidden;
    display: block;
}

#app-container {
    flex: 1;
    position: relative;
    z-index: 1;
    background: inherit;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.header {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1rem;
    position: relative;
    font-family: 'KartriderBold', sans-serif;
}

.logo-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}   

.menu-container {
    max-width: 1200px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    position: relative;
}

@media (min-width: 1200px) {
    .menu-container {
        grid-template-columns: repeat(3, 1fr); /* 데스크탑에서 3열 고정 */
    }
}

.menu-item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-family: 'KartriderBold', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.2), transparent 70%);
    transform: translateX(-100%);
    transition: 0.5s;
}

.menu-item:hover::before {
    transform: translateX(100%);
}

.menu-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
}

.icon {
    font-size: 3.5rem;
    color: var(--primary);
    text-align: center;
    transition: transform 0.3s ease;
    margin-right: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-item:hover .icon {
    transform: scale(1.3) rotate(8deg); /* 호버 시 더 큰 확대 효과 */
    color: var(--secondary); /* 호버 시 색상 변경 */
}
.menu-content {
    flex: 1;
}

.menu-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--secondary);
}

.menu-subtitle {
    font-size: 1rem;
    color: #666;
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatShape infinite linear;
}

@keyframes floatShape {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

@media (max-width: 768px) {
    body {
        min-height: -webkit-fill-available;
        padding: 0;
        margin: 0;
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .logo {
        font-size: 2.5rem;
    }

    .menu-container {
        margin: 10px auto;
        padding: 0.8rem;
        gap: 0rem;
        grid-template-columns: 1fr;
    }

    .menu-item {
        margin: 0.5rem 0;
    }

    .icon {
        font-size: 2.5rem;
    }

    .menu-title {
        font-size: 1.2rem;
    }

    .menu-subtitle {
        font-size: 0.8rem;
    }
}

/* 모바일 기기에서 hover 효과 비활성화 */
@media (hover: none) {
    .menu-item:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        background: var(--card-bg);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .menu-item:hover .icon {
        transform: none;
        color: var(--primary);
    }
}

@media (prefers-reduced-motion: reduce) {

    .menu-item::before,
    .menu-item:hover,
    .icon,
    .shape,
    .logo {
        animation: none;
        transition: none;
        transform: none;
    }
}

/* iOS Safari 대응 */
@supports (-webkit-touch-callout: none) {
    html {
        height: -webkit-fill-available;
        background-attachment: scroll;
    }
    
    body {
        min-height: -webkit-fill-available;
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    html, body {
        height: 100%;
        min-height: 100%;
    }
}