:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent1: #FFE66D;
    --accent2: #7AC7C4;
    --accent3: #FB9E91;
    --text: #303030;
    --light: #F9F9F9;
.load-more-container {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.3);
}

.load-more-btn:hover {
    background-color: #3DBEB6;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(78, 205, 196, 0.4);
}

.load-more-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Arial', sans-serif;
}

body {
    background-color: var(--light);
    background-image: 
        radial-gradient(var(--accent1) 1px, transparent 1px),
        radial-gradient(var(--accent3) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--accent2) 30%, 
        var(--accent3) 60%, 
        var(--accent1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    position: relative;
    display: inline-block;
    text-shadow: none;
}

.logo::after {
    content: "Kids.Search";
    position: absolute;
    left: 2px;
    top: 2px;
    z-index: -1;
    background: none;
    color: rgba(0,0,0,0.15);
    -webkit-text-fill-color: rgba(0,0,0,0.15);
}

.tagline {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 20px;
    background: linear-gradient(90deg, 
        var(--accent2) 0%, 
        var(--accent3) 50%, 
        var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    font-weight: bold;
}

.search-container {
    background-color: white;
    border-radius: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
    border: 3px solid var(--primary);
}

.search-bar {
    display: flex;
    margin-bottom: 20px;
}

#search-input {
    flex-grow: 1;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: 3px solid var(--secondary);
    border-radius: 50px;
    outline: none;
    margin-right: 10px;
    transition: all 0.3s;
}

#search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

#search-button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

#search-button .search-text {
    display: inline;
}

#search-button .search-icon {
    display: none;
    width: 24px;
    height: 24px;
}

#search-button:hover {
    background-color: #FF5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.search-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.search-option {
    background-color: var(--light);
    border: 2px solid var(--secondary);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.search-option.active {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
    font-weight: bold;
}

.search-option:hover {
    background-color: var(--accent2);
    color: white;
    border-color: var(--accent2);
}

.results-container {
    background-color: white;
    border-radius: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 30px;
    border: 3px solid var(--secondary);
    min-height: 200px;
    display: none;
}

.results-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px dashed var(--accent3);
}

.results {
    display: grid;
    gap: 10px;
}

.all-results .result-item {
    background-color: var(--light);
    border-radius: 15px;
    padding: 15px;
    transition: all 0.3s;
    border-left: 5px solid var(--primary);
    margin-bottom: 2px;
}

.all-results .result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.result-thumbnail {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    margin-right: 15px;
    float: left;
}

.result-content {
    width: 100%;
}

.result-layout {
    display: flex;
    margin-top: 10px;
}

.result-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0;
    font-weight: bold;
}

.result-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s;
}

.result-title a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.result-url {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-top: auto;
    word-break: break-all;
}

.result-description {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.image-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.image-results .result-item {
    background-color: var(--light);
    border-radius: 15px;
    padding: 10px;
    transition: all 0.3s;
    text-align: center;
}

.image-results .result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.image-results img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.loading {
    text-align: center;
    padding: 30px;
    font-size: 1.2rem;
    color: var(--primary);
    display: none;
}

.loading-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid var(--accent1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.animated-clouds {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: -1;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: float linear infinite;
}

.cloud1 {
    width: 80px;
    height: 40px;
    bottom: 20px;
    left: 10%;
    animation-duration: 60s;
}

.cloud2 {
    width: 120px;
    height: 60px;
    bottom: 40px;
    left: 30%;
    animation-duration: 75s;
}

.cloud3 {
    width: 100px;
    height: 50px;
    bottom: 15px;
    left: 60%;
    animation-duration: 95s;
}

.cloud4 {
    width: 150px;
    height: 70px;
    bottom: 50px;
    left: 80%;
    animation-duration: 110s;
}

@keyframes float {
    from {
        transform: translateX(-100px);
    }
    to {
        transform: translateX(calc(100vw + 100px));
    }
}

/* For news results */
.news-results .result-item {
    background-color: var(--light);
    border-radius: 15px;
    padding: 15px;
    transition: all 0.3s;
    border-left: 5px solid var(--accent1);
    margin-bottom: 15px;
}

.news-results .result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.news-date {
    color: var(--accent3);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: var(--text);
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 30px;
    font-size: 1.2rem;
    color: var(--primary);
}

.no-results img {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
}

/* Animation for shake effect */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    #search-button {
        padding: 12px;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        min-width: 50px;
    }
    
    #search-button .search-text {
        display: none;
    }
    
    #search-button .search-icon {
        display: inline;
    }
    
    #search-input {
        border-radius: 25px;
        padding: 12px 15px;
        font-size: 1.1rem;
    }
    
    .search-container {
        padding: 20px;
    }
    
    .search-options {
        flex-wrap: wrap;
    }
    
    .search-option {
        padding: 8px 15px;
        font-size: 1rem;
        margin-bottom: 5px;
        flex-grow: 1;
        text-align: center;
        min-width: 100px;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .results-container {
        padding: 20px;
    }
    
    .image-results {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .result-title {
        font-size: 1.1rem;
    }
    
    .result-description {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .result-thumbnail {
        width: 100px;
        height: 100px;
    }
    
    .result-layout {
        flex-direction: row;
    }
}

/* Ensuring text legibility on smaller devices */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    #search-input {
        font-size: 1rem;
        padding: 10px 15px;
    }
    
    .search-option {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .results-title {
        font-size: 1.2rem;
    }
    
    .result-title {
        font-size: 1rem;
    }
    
    .result-description {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .image-results {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .result-thumbnail {
        width: 90px;
        height: 90px;
        margin-right: 10px;
    }
    
    .result-layout {
        display: flex;
        margin-top: 5px;
    }
    
    /* Enhance Load More button on mobile */
    .load-more-btn {
        width: 100%;
        padding: 12px;
        margin-top: 15px;
        font-size: 0.95rem;
    }
}