* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/*Navigation*/
nav {
    background: #e74c3c;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: white;
    text-decoration: none;
}

.nav-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.nav-logo img {
    width: 30px;
    height: 30px;
}


.nav-brand-text {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem;
    user-select: none;
    color: white;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 250px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    transform: translateX(-50%) translateY(-10px);
    max-height: 0;
    overflow: hidden;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    max-height: 500px;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #666;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    border-radius: 5px;
    margin: 0 0.5rem;
}

.dropdown-menu a:hover {
    background: #f8f8f8;
    color: #e74c3c;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

/* Main layout */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px - 280px);
    padding: 3rem 1.5rem;
}

.page-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Page header */
.page-header {
    text-align: center;
    padding: 0 0 .5rem;
}

.page-title {
    color: #e74c3c;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.page-sub {
    color: #777;
    font-size: 1rem;
    line-height: 1.6;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 3rem 3.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.card-title {
    color: #e74c3c;
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    text-align: center;
    color: #999;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* Form */
.harvest-form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}


.form-group select,
.form-group input[type="text"] {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

/* Arrow only for select */
.form-group select {
    padding-right: 3rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group input[type="text"] {
    cursor: text;
}

.form-group select:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input[type="text"]::placeholder {
    color: #aaa;
}

/* Generate button */
.btn-generate {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.btn-generate:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    background: #b0b0b0;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.btn-generating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: medium;
}

/* animated dots */
.dots::after {
    content: "";
    animation: dotsAnim 1.5s infinite;
}

@keyframes dotsAnim {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75% {
        content: "...";
    }

    100% {
        content: "";
    }
}

.hidden {
    display: none !important;
}


/* Result card */
.result-card {
    animation: fadeSlideIn 0.4s ease-out;
}

.result-card .card-title {
    margin-bottom: 2rem;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Recommendation list */
.rec-list {
    display: flex;
    flex-direction: column;
}

.rec-item {
    padding: 0.8rem 0;
}

.rec-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.rec-body {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.75;
    margin: 0;
}

.rec-body-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rec-body-list li {
    font-size: 0.95rem;
    color: #555;
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.7;
}

.rec-body-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: 700;
}

.rec-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 16px 0;
}

/* Save row */
.save-row {
    display: flex;
    justify-content: center;
    margin-top: -0.5rem;
}

.btn-save {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.btn-save:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-save:active {
    transform: translateY(0);
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.modal-content h3 {
    font-size: 1.4rem;
    color: #222;
    margin-bottom: 0.6rem;
}

.modal-content p {
    color: #666;
    font-size: 0.97rem;
    margin-bottom: 1.8rem;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-modal {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    min-width: 100px;
    font-family: inherit;
}

.btn-yes {
    background: #e74c3c;
    color: white;
}

.btn-yes:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-no {
    background: #ecf0f1;
    color: #555;
}

.btn-no:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2ecc71;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 3000;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #e74c3c;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        margin: 0.3rem 0 0;
    }

    .dropdown-menu a {
        color: white;
        margin: 0;
    }

    .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .card {
        padding: 2rem 1.8rem;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .card-subtitle {
        font-size: 0.88rem;
        margin-bottom: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .save-row {
        justify-content: stretch;
    }

    .btn-save {
        width: 100%;
        text-align: center;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .btn-modal {
        width: 100%;
    }


}

@media (max-width: 480px) {
    .card-title {
        font-size: 1.35rem;
    }

}