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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 0;
}

.header-bar {
    background: #ffffff;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #e60023;
    text-decoration: none;
    min-width: 80px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.hero-section {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 16px;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 600;
    color: #111;
    margin-bottom: 30px;
    text-align: center;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.featured-item {
    position: relative;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.featured-item:hover {
    transform: scale(0.98);
}

.featured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    color: white;
}

.featured-overlay small {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.featured-overlay h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.see-more-btn {
    display: block;
    margin: 0 auto 60px;
    padding: 12px 32px;
    background: #efefef;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    transition: background 0.2s ease;
}

.see-more-btn:hover {
    background: #e0e0e0;
}

.category-section {
    max-width: 1280px;
    margin: 0 auto 60px;
    padding: 0 16px;
}

.category-section h2 {
    font-size: 32px;
    font-weight: 600;
    color: #111;
    margin-bottom: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.category-item {
    position: relative;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-item:hover {
    transform: scale(0.95);
}

.category-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

#header {
    display: none;
}

.search-container {
    flex: 1;
    max-width: 800px;
    margin: 0;
}

.search-container form {
    display: flex;
    background: #efefef;
    border-radius: 24px;
    overflow: hidden;
    border: none;
    padding: 0;
    gap: 0;
}

input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
    min-width: 0;
}

input[type="text"]:focus {
    background: #e0e0e0;
    border-radius: 24px 0 0 24px;
}

input[type="text"]::placeholder {
    color: #767676;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background: #e60023;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 0 24px 24px 0;
}

button:hover {
    background: #d50621;
}

.result-container {
    column-count: 5;
    column-gap: 16px;
    padding: 16px;
    margin: 0 auto;
    max-width: 100%;
}

.result-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-item:hover {
    filter: brightness(0.95);
}

.result-item:hover .info {
    opacity: 1;
}

.result-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.result-item .info {
    padding: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.result-item:hover .info {
    opacity: 1;
}

.result-item .info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    line-height: 1.3;
}

.result-item .info h3 a {
    color: #111;
    text-decoration: none;
}

.result-item .info h3 a:hover {
    text-decoration: underline;
}

.result-item .info p {
    margin: 0;
    font-size: 12px;
    color: #767676;
    line-height: 1.4;
    display: none;
}

.result-item .btn-container {
    padding: 0 12px 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.result-item:hover .btn-container {
    opacity: 1;
}

.btn-danger {
    background: #e60023;
    color: white;
    padding: 12px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: block;
    width: 100%;
    border-radius: 24px;
    margin: 0;
    transition: background 0.2s ease;
    text-align: center;
    font-size: 14px;
}

.btn-danger:hover {
    background: #d50621;
}

footer {
    margin-top: 50px;
}

#loading {
    text-align: center;
    padding: 40px;
    color: #767676;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1440px) {
    .result-container {
        column-count: 4;
    }
}

@media (max-width: 1024px) {
    .result-container {
        column-count: 3;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-section h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .header-bar {
        flex-wrap: wrap;
    }

    .search-container {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }

    .result-container {
        column-count: 1;
        column-gap: 8px;
        padding: 8px;
    }

    .result-item {
        margin-bottom: 8px;
    }

    .result-item .info {
        opacity: 1;
    }

    .result-item .btn-container {
        opacity: 1;
    }

    .result-item .info p {
        display: none;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .featured-item {
        height: 220px;
    }

    .category-item {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .result-container {
        column-count: 1;
    }

    .logo {
        font-size: 20px;
    }
}
