:root {
    --bg-color: #f0f2f5;
    --card-bg-color: #ffffff;
    --primary-text-color: #2d3748;
    --secondary-text-color: #718096;
    --accent-color: #ff6f00; /* Orange accent color */
    --border-color: #e2e8f0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.main-container {
    width: 100%;
    max-width: 800px;
    /* Padding is applied to children now for better sticky behavior */
    text-align: center;
}

/* --- Sticky Header Section --- */
.sticky-top-section {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--bg-color);
    padding: 5vh 20px 20px 20px; /* Top, Right, Bottom, Left padding */
}

/* --- Gradient Shadow Effect --- */
.sticky-top-section::after {
    content: '';
    position: absolute;
    bottom: -30px; /* Positions the gradient just below the section */
    left: 0;
    right: 0;
    height: 30px; /* The height/fade distance of the gradient */
    background: linear-gradient(to bottom, var(--bg-color), rgba(240, 242, 245, 0));
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* Allows clicks to pass through the gradient */
}

.sticky-top-section.is-scrolled::after {
    opacity: 1; /* Makes the gradient visible on scroll */
}


/* --- Header Content --- */
header {
    margin-bottom: 40px;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 40px;
    width: auto;
}

h1 {
    font-size: 2.0rem;
    font-weight: 600;
    margin: 0;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-top: 5px;
}

/* --- Search Bar --- */
.search-wrapper {
    margin-bottom: 40px;
    position: relative;
}

.search-input {
    width: 100%;
    height: 55px;
    padding: 0 50px 0 20px;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    color: var(--primary-text-color);
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}
.search-input::placeholder {
    color: #a0aec0;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.2);
}

.clear-search-btn {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--secondary-text-color);
    cursor: pointer;
    display: none;
}
.clear-search-btn:hover {
    color: var(--primary-text-color);
}

/* --- Main Content Area (Prompt & Results) --- */
#initial-prompt,
#results-container {
    padding-left: 20px;
    padding-right: 20px;
}

#initial-prompt {
    color: var(--secondary-text-color);
    padding-top: 50px;
    padding-bottom: 50px;
}

/* #initial-prompt .fas,
#initial-prompt .fa-solid {
    font-size: 4rem;
    margin-bottom: 15px;
} */
.initial-prompt-image {
    height: 250px; /* Adjust this value to make the image bigger or smaller */
    margin-bottom: 15px;
}

#results-container {
    text-align: left;
}

/* --- Result Cards --- */
.result-item {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin: 15px 0;
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
    border-left: 5px solid transparent;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--accent-color);
}

.result-item .sentence {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    padding-right: 40px;
    line-height: 1.6;
}

.result-item .tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    background-color: #fff3e0; /* Background color matching the new accent */
    padding: 5px 12px;
    border-radius: 20px;
    margin: 0;
}

.copy-btn {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, color 0.2s ease;
    font-size: 1.5rem;
    color: var(--secondary-text-color);
}

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

.copy-btn:hover {
    color: var(--accent-color);
}

/* --- SweetAlert Customization --- */
.swal2-title {
    font-weight: 600 !important;
}

.swal2-confirm {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 400 !important;
}

.swal-grid-container {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 15px;
    text-align: left;
    margin-top: 1.5em;
    font-size: 1rem;
}

.swal-label {
    font-weight: 600;
    color: var(--primary-text-color);
    grid-column: 1;
    white-space: nowrap;
}

.swal-value {
    color: var(--secondary-text-color);
    grid-column: 2;
    line-height: 1.6;
}