@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #ff7e5f;
    --secondary-color: #feb47b;
    --background-color: #fdfaf6;
    --text-color: #333;
    --white: #fff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 25vh; /* Add padding to prevent overlap for bottom nav */
    padding-top: 80px; /* Account for fixed top search header */
}

/* Fixed Search Header */
#fixed-search-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 999; /* Below welcome screen, above main content */
    padding: 10px 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

#fixed-search-header.hidden {
    transform: translateY(-100%);
}

#fixed-search-header .search-container {
    margin: 0;
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 600px;
}

#fixed-search-header input[type="text"] {
    flex-grow: 1;
    margin: 0;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

#fixed-search-header button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Welcome Screen Specific Styles */
#welcome-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    position: fixed; /* Ensures it covers the entire viewport */
    top: 0;
    left: 0;
    background-color: var(--background-color);
    z-index: 2000; /* Ensure it's on top initially */
    transition: opacity 0.5s ease-in-out;
}

#welcome-screen.active {
    opacity: 1;
    pointer-events: auto;
}

#welcome-screen.inactive {
    opacity: 0;
    pointer-events: none; /* Disable interaction when fading out */
}

/* App Specific Styles */
#app {
    padding: 2rem; /* Initial padding for content */
    opacity: 0; /* Hidden by default for fade-in */
    transition: opacity 0.5s ease-in-out;
    width: 100%;
    min-height: calc(100vh - 25vh); /* Take remaining height, considering footer */
}

#app.active {
    opacity: 1;
}

/* Global hidden class */
.hidden {
    display: none !important; /* Use !important to ensure it overrides other display properties */
}


/* ... rest of the existing styles ... */

h1, h2 {
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
}

input[type="text"] {
    width: 100%;
    max-width: 500px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    margin: 1rem 0;
    text-align: center;
}

button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.4);
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 126, 95, 0.6);
}

header {
    margin-bottom: 2rem;
}

.search-container {
    text-align: center;
    margin-bottom: 3rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.image-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
}

.image-grid img.selected {
    outline: 4px solid var(--primary-color);
    box-shadow: 0 15px 40px rgba(255, 126, 95, 0.5);
}

.vision-board-container {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#vision-board {
    margin-top: 2rem;
    border: 2px dashed var(--secondary-color);
    padding: 1rem;
    border-radius: 15px;
    min-height: 300px;
}

#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25vh;
    background-color: var(--white);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    z-index: 1000;
}

#selected-thumbnails-container {
    flex-grow: 1;
    overflow-x: auto;
    height: 100%;
}

#selected-thumbnails {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 100%;
    padding: 1rem;
}

.thumbnail-wrapper {
    position: relative;
    flex-shrink: 0; /* Prevent thumbnails from shrinking */
}

.thumbnail-wrapper .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.thumbnail-wrapper:hover .delete-btn {
    opacity: 1;
}

#selected-thumbnails img {
    height: calc(25vh - 2rem);
    width: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: var(--shadow);
    display: block;
}

.footer-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    height: 100%;
    border-left: 1px solid #eee;
}

#loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
}

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

.button-like {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.4);
    text-decoration: none;
    transition: all 0.3s ease;
}

.button-like:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 126, 95, 0.6);
}


