* {
    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 {
    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%) translateY(-10px);
    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;
    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 CONTENT */
.main-content {
    margin-top: 80px;
    padding: 2rem 1rem;
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
    text-align: center;
    color: #e74c3c;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

/* FORM */
.guidance-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group select {
    padding: 0.8rem 3rem 0.8rem 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;

    /* Hide native arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Custom arrow using SVG */
    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 1.2rem center;
    /* adjust '1.2rem' to move arrow left/right */
}

.form-group select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.btn-generate {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-generate:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    background: #95a5a6;
    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;
}

/* RECOMMENDATION SECTION */
.recommendation-section {
    margin-top: 3rem;
}

.recommendation-section.hidden {
    display: none;
}

.recommendation-content {
    margin-bottom: 2rem;
}

.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 BUTTON */
.btn-save {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: block;
    margin: 0 auto;
}

.btn-save:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-save:active {
    transform: translateY(0);
}

/*  MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-modal {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-yes {
    background: #e74c3c;
    color: white;
}

.btn-yes:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-no {
    background: #ecf0f1;
    color: #555;
}

.btn-no:hover {
    background: #bdc3c7;
    transform: translateY(-2px);
}

.btn-yes:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* 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;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 2rem 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #e74c3c;
        padding: 1rem;
        gap: 0.5rem;
    }

    .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.1);
    }

    .dropdown-menu a {
        color: white;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .btn-modal {
        width: 100%;
    }
}