:root {
    --primary: #FF5E5B;
    --secondary: #00CECB;
    --dark: #2D3047;
    --light: #FFFFEA;
    --accent: #FFED66;
    --success: #48c457;
}

body {
    background-color: var(--light);
    font-family: 'Courier New', monospace;
    margin: 0;
    padding: 0;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden; 
}

.container {
    max-width: 800px;
    margin: 0.3rem auto;
    padding: 0 1rem;
}

.container-footer {
    max-width: 800px;
    margin: 0.5rem auto;
    padding: 0 1rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--primary);
    z-index: -1;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--dark);
    opacity: 0.8;
}

.search-box {
    background-color: white;
    border: 3px solid var(--dark);
    box-shadow: 8px 8px 0 var(--dark);
    padding: 2rem;
    margin-bottom: 2rem;
}

.search-form .form-group {
    margin-bottom: 1.5rem;
}

.search-form input {
    width: 100%;
    padding: 1rem;
    border: 3px solid var(--dark);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    background-color: white;
    box-shadow: 4px 4px 0 var(--dark);
    transition: all 0.2s;
    box-sizing: border-box;
}
.search-form select {
    width: 100%;
    padding: 1rem;
    border: 3px solid var(--dark);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    background-color: white;
    box-shadow: 4px 4px 0 var(--dark);
    transition: all 0.2s;
    flex: 0 0 150px;
}

.search-form input:focus,
.search-form select:focus {
    outline: none;
    box-shadow: 6px 6px 0 var(--primary);
    border-color: var(--primary);
}

.search-button {
    background-color: var(--primary);
    color: white;
    border: 3px solid var(--dark);
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 6px 6px 0 var(--dark);
    transition: all 0.2s;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    width: 100%;
    flex: 0 0 120px; /* Lebar tetap untuk tombol */
    white-space: nowrap; /* Teks tidak wrap */
}

.search-button:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--dark);
    color: black;
}

.search-button:active {
    transform: translate(6px, 6px);
    box-shadow: 0 0 0 var(--dark);
}

.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.error-message {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    border: 3px solid var(--dark);
    box-shadow: 4px 4px 0 var(--dark);
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: white;
    border: 3px solid var(--dark);
    box-shadow: 6px 6px 0 var(--dark);
    padding: 1.5rem;
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--dark);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.feature-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .search-box {
        padding: 1.5rem;
    }
}
@media (max-width: 600px) {
    .search-form input {
        flex-direction: column;
    }
    
    .search-form select,
    .search-button {
        flex: 1;
        width: 100%;
    }
}

/* Navbar Styles */
.minimal-header {
    overflow-x: hidden;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%; /* Diubah dari 100vw */
    box-sizing: border-box; /* Ditambahkan */
}

.container-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Ditambahkan */
    box-sizing: border-box; /* Ditambahkan */
}

/* Logo Styles */
.site-brand .site-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e04a47;
    text-decoration: none;
}

/* Main Navigation - Desktop */
.main-nav {
    display: flex;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li:not(.donate-li) a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-links li:not(.donate-li) a:hover {
    color: #e04a47;
}

.nav-links li:not(.donate-li) a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e04a47;
    transition: width 0.3s;
}

.nav-links li:not(.donate-li) a:hover::after {
    width: 100%;
}

/* Donate Button */
.donate-li {
    margin-left: 0.5rem;
}

.donate-btn {
    background-color: #e04a47;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.donate-btn:hover {
    background-color: rgb(111, 78, 55);
}

.donate-btn i.fa-coffee {
    animation: bounce 1s infinite alternate;
}
@keyframes bounce {
    to { transform: translateY(-3px); }
}

/* Mobile Menu Toggle Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.mobile-only {
    display: none;
}

/* Responsive Styles - Mobile */
@media (max-width: 768px) {
    .container-nav {
        padding: 0 15px;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateX(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.2s ease;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .main-nav.active {
        transform: translateX(0);
        opacity: 1;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
        width: 85vw; /* Full width */
        left: 0;
        padding: 1rem 15px; /* Consistent padding */
        box-sizing: border-box; /* Include padding in width */
    }
    
    .nav-links li {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        width: 100%; /* Full width items */
        box-sizing: border-box;
    }
    
    .nav-links li a {
        white-space: normal;
        word-break: break-word;
        display: inline-block;
        max-width: 100%;
    }
    
    .donate-li {
        margin: 1rem 0 0 0;
        width: 100%;
        border-bottom: none;
    }

    .donate-btn {
        width: 100%;
        max-width: 100%;
        display: block;
        text-align: center;
        padding: 12px 10px !important;
        margin: 10px 0 0 0;
        white-space: normal; /* Allow text wrapping */
    }
    
    .mobile-only {
        display: block;
    }
    
    /* Hamburger Animation */
    .hamburger.active .hamburger-line:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }
    
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Footer Styles */
.site-footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col {
    margin-left: 2rem;
}

@media (max-width: 768px) {
    .footer-col {
        margin-left: 0.5rem;
    }
}

.footer-col h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-col a {
    color: #ddd;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
}

.copyright-bar {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.quick-links {
    list-style: none;
    padding: 0;
}

.quick-links li {
    margin-bottom: 12px;
}

.quick-links a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    padding: 6px 0;
}

.quick-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.quick-links i {
    width: 20px;
    text-align: center;
    font-size: 1.1em;
}

.fa-heart {
  animation: pulse 1.5s infinite;
  display: inline-block;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Additional Features */
.additional-features {
    margin: 3rem 0;
}

.recent-searches {
    background-color: white;
    border: 3px solid var(--dark);
    box-shadow: 8px 8px 0 var(--dark);
    padding: 2rem;
    margin-bottom: 2rem;
}

.popular-categories {
    background-color: white;
    border: 3px solid var(--dark);
    box-shadow: 8px 8px 0 var(--dark);
    padding: 2rem;
}

.recent-searches h3, .popular-categories h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recent-searches h3::after, .popular-categories h3::after {
    content: '';
    flex: 1;
    height: 3px;
    background-color: var(--primary);
    margin-left: 1rem;
}

/* Recent Searches - Keyword Tags Style */
.search-history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.search-history-tag {
    background-color: white;
    color: var(--dark);
    padding: 0.3rem 0.8rem;
    border: 2px solid var(--dark);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.search-history-tag:hover {
    background-color: var(--primary);
    color: white;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--dark);
}

.search-history-tag .year-badge {
    background-color: var(--dark);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 0.3rem;
    box-shadow: none;
}

/* Popular Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: var(--light);
    border: 2px solid var(--dark);
    padding: 1.5rem;
    transition: all 0.2s;
}

.category-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.category-card h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--secondary);
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background-color: white;
    color: var(--dark);
    padding: 0.4rem 0.8rem;
    border: 2px solid var(--dark);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.keyword-tag:hover {
    background-color: var(--secondary);
    color: white;
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--dark);
}

/* Responsive */
@media (max-width: 600px) {
    .recent-searches, .popular-categories {
        padding: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    .recent-searches h3, .popular-categories h3 {
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-content {
    text-align: center;
    max-width: 300px;
    padding: 2rem;
    background: white;
    border: 3px solid var(--dark);
    /* box-shadow: 8px 8px 0 var(--dark); */
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-details {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: bold;
}

#results-container {
    transition: opacity 0.3s ease;
}
#results-container.loading {
    opacity: 0.5;
}