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

:root {
    /* More vibrant blue/purple gradient feel */
    --primary-color: #4F46E5;
    /* Indigo */
    --primary-hover: #4338CA;
    --text-color: #1F2937;
    --bg-gradient-start: #EEF2FF;
    --bg-gradient-end: #E0E7FF;
    --input-underline: #CBD5E1;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 720px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.6);
    /* Glassmorphism effect */
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 0.8s ease-out;
}

h1 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

.brand-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.main-title {
    font-size: 2rem;
    font-weight: 600;
    color: #111827;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
    margin-bottom: 2rem;
    opacity: 1;
}

.question-label {
    display: block;
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 2rem;
    color: #111827;
}

.form-group {
    margin-bottom: 2.5rem;
    position: relative;
}

input[type="text"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--input-underline);
    border-radius: 0;
    padding: 0.75rem 0;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--primary-color);
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus {
    border-bottom-color: var(--primary-color);
}

input[type="text"]::placeholder {
    color: #94A3B8;
    font-weight: 300;
    font-size: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: linear-gradient(to right, var(--primary-color), #6366F1);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.btn span {
    margin-left: 10px;
    font-weight: 700;
}

.btn:disabled {
    background: linear-gradient(to right, #94A3B8, #CBD5E1);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Custom Autocomplete Dropdown */
.autocomplete-wrapper {
    position: relative;
}

.custom-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 8px;
}

.dropdown-item {
    padding: 1.25rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #E2E8F0;
    color: #334155;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-item.no-result {
    color: #94A3B8;
    cursor: default;
}

.dropdown-item.no-result:hover {
    background-color: transparent;
}

.secondary-option {
    margin-top: 3.5rem;
    text-align: left;
}

.toggle-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: transparent;
    border: 2px solid #CBD5E1;
    border-radius: 8px;
    color: #64748B;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 2rem;
}

.toggle-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #EEF2FF;
}

.hidden-section {
    display: none;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #E2E8F0;
    animation: slideIn 0.4s ease-out forwards;
}

.alert {
    padding: 1.25rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
    font-weight: 600;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

.alert-info {
    background-color: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.analyst-result {
    text-align: center;
    padding: 2rem 0;
}

.analyst-card {
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.analyst-label {
    font-size: 1rem;
    color: #64748B;
    margin-bottom: 0.5rem;
}

.analyst-name {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
}

.result-message {
    color: #64748B;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.link-back {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: #F8FAFC;
}

.link-back:hover {
    color: #64748B;
    border-color: #CBD5E1;
    background: transparent;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #94A3B8;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #334155;
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    color: #111827;
    font-size: 1.75rem;
}

.modal-subtitle {
    color: #64748B;
    margin-bottom: 2rem;
    font-size: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
        scale: 0.98;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        scale: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}