* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    padding: 40px 20px 20px;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 36px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    font-size: 32px;
    color: #3498db;
}

.logo-symbol {
    background: #3498db;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: lowercase;
}

.logo-symbol::before {
    content: "go";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
    width: 100%;
    text-align: center;
    line-height: 1;
}

.logo:hover .logo-symbol {
    transform: rotate(5deg);
}

body.dark-mode .logo-symbol {
    background: #3498db;
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-bar input {
    flex-grow: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
}

.search-bar button {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

.categories-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.categories-wrapper::-webkit-scrollbar {
    display: none;
}

.category {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    min-width: 100%;
    scroll-snap-align: start;
    flex: 0 0 auto;
    transition: transform 0.3s ease;
}

.category:hover {
    transform: scale(1.01);
}

.category-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title .icon {
    font-size: 20px;
    color: #3498db;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 10px 0;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #f8f8f8;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: 40px;
    width: 100%;
}

.link-item:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.link-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.link-item span {
    display: block;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.weather-widget {
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    color: #333;
    border-radius: 8px;
    text-align: left;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.weather-widget h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #8b6bff;
    padding-bottom: 8px;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.weather-icon {
    color: #8b6bff;
    font-size: 24px;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-temp {
    font-size: 20px;
    font-weight: 500;
}

.weather-desc {
    font-size: 14px;
    color: #666;
}

.weather-location {
    font-size: 14px;
    color: #666;
}

body.dark-mode .weather-widget {
    background: #333;
    color: #f5f5f5;
}

body.dark-mode .weather-widget h2 {
    color: #f5f5f5;
}

body.dark-mode .weather-desc,
body.dark-mode .weather-location {
    color: #aaa;
}

.ad-banner {
    margin-bottom: 20px;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ad-banner-container {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.ad-banner-slide {
    min-width: 100%;
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    background: none;
}

.ad-banner-slide img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.ad-banner-controls {
    display: none;
}

.ad-banner-dots {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    background-color: rgba(0,0,0,0.3);
    padding: 3px 6px;
    border-radius: 12px;
    z-index: 1;
}

.ad-banner-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ad-banner-dot.active {
    background-color: white;
    transform: scale(1.2);
}

body.dark-mode .ad-banner {
    background: #333;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

footer {
    margin-top: 40px;
    text-align: center;
    color: #777;
    font-size: 14px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.footer-info {
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-links {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #777;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-notice {
    margin: 15px 0;
    line-height: 1.6;
}

.footer-copyright {
    margin-top: 15px;
    font-weight: 500;
}

body.dark-mode footer {
    border-top-color: #444;
}

body.dark-mode .footer-links a {
    color: #aaa;
}

body.dark-mode .footer-links a:hover {
    color: #3498db;
}

/* 로딩 표시 */
.loading {
    text-align: center;
    padding: 50px 0;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 다크 모드 토글 스타일 */
.dark-mode-toggle {
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    background-color: #444;
}

body.dark-mode .dark-mode-toggle {
    background-color: #555;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark-mode .dark-mode-toggle:hover {
    background-color: #666;
}

/* 다크 모드 스타일 */
body.dark-mode {
    background-color: #222;
    color: #f5f5f5;
}

body.dark-mode .category {
    background-color: #333;
    border: 1px solid #444;
}

body.dark-mode .link-item {
    color: #f5f5f5;
    background-color: #444;
}

body.dark-mode .link-item:hover {
    background-color: #555;
}

body.dark-mode .category-title {
    color: #f5f5f5;
    border-bottom-color: #3498db;
}

body.dark-mode .category-title .icon {
    color: #3498db;
}

body.dark-mode .category-slice-item {
    background-color: #444;
    color: #f5f5f5;
    border: 1px solid #555;
}

body.dark-mode .category-slice-item.active {
    background-color: #3498db;
    color: white;
    border: 1px solid #2980b9;
}

body.dark-mode .category-slice-item:hover {
    background-color: #2980b9;
}

body.dark-mode .link-icon {
    filter: none;
}

body.dark-mode .search-bar input {
    background-color: #333;
    color: #f5f5f5;
    border-color: #444;
}

body.dark-mode .search-bar input::placeholder {
    color: #aaa;
}

/* 모바일 반응형 스타일 */
@media (min-width: 600px) {
    .container {
        width: 650px;
    }
    
    .category {
        width: 450px;
    }

    .categories-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }
}

/* 모바일 반응형 스타일 */
@media (max-width: 599px) {
    body {
        padding: 20px 10px 10px;
    }

    .container {
        width: 100%;
    }
    
    .category {
        width: 100%;
        min-width: 100%;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 카테고리 슬라이스 메뉴 스타일 */
.category-slice-menu {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.category-slice-menu::-webkit-scrollbar {
    display: none;
}

.category-slice-item {
    background-color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.category-slice-item.active {
    background-color: #3498db;
    color: white;
}

body.dark-mode .category-slice-item {
    background-color: #333;
    color: #f5f5f5;
}

body.dark-mode .category-slice-item:hover {
    background-color: #2980b9;
}

.search-bar input::placeholder {
    color: #999;
}

header p {
    color: #999;
    font-size: 14px;
}

body.dark-mode header p {
    color: #888;
} 