:root {
    --bg-color: #000000;
    --nav-bg: #1a1a1a;
    --text-color: #ffffff;
    --accent-color: #555555;
    --hover-bg: #333333;
    --container-padding: 1.5rem;
}

body {
    background-color: var(--bg-color);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

header {
    height: 60px;
}

.navbar {
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    overflow-x: auto;
    white-space: nowrap;
}

.navbar a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.navbar a:hover {
    background-color: var(--hover-bg);
    color: white;
}

.navbar a.active {
    color: white;
    background-color: #444;
    font-weight: bold;
    border-bottom: 2px solid white;
}

.search-container {
    width: 100%;
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
}

.search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px auto;
    max-width: 400px;
}

#searchInput {
    flex: 1;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: #222;
    color: white;
}

.dark-button {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    background-color: #444;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dark-button:hover {
    background-color: #666;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 var(--container-padding) 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.subtitle {
    width: 100%;
    text-align: left;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 30px 0 15px;
    border-left: 4px solid #fff;
    padding-left: 10px;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    width: 100%;
    justify-items: center;
}

.item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    transition: transform 0.2s ease;
}

.item:hover {
    transform: translateY(-5px);
}

.img-tool {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: opacity 0.2s;
}

.img-tool:hover {
    opacity: 0.85;
}

.appName {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
    word-break: keep-all;
}

.loading {
    padding: 50px;
    font-size: 1.1rem;
    color: #888;
}

@media (max-width: 600px) {
    .navbar a {
        padding: 0.5rem 0.6rem;
        font-size: 11px;
    }
    
    .row {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .item {
        width: 80px;
    }
    
    .img-tool {
        width: 50px;
        height: 50px;
    }
}

.error-notice {
    background-color: #222;
    border: 1px solid #ff4d4d;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    margin: 2rem auto;
    text-align: left;
    line-height: 1.6;
}

.error-notice hr {
    border: 0;
    border-top: 1px solid #444;
    margin: 1.5rem 0;
}

.error-notice code {
    background-color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    color: #00ff00;
}

.error-notice ul {
    padding-left: 20px;
}
