/* Technological Multiplier Analyzer Section */
#tech-multiplier {
    position: relative;
    overflow: hidden;
    min-height: 5vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 5%;
    background: linear-gradient(45deg, #000000, #1a1a1a); /* Matches --dark-gradient */
    isolation: isolate; /* Ensures z-index layering */
}

.section-title {
    font-family: var(--fun-font); /* Press Start 2P */
    font-size: 1rem;
    background: linear-gradient(45deg, #00f3ff, #00ff88); /* Matches --light-gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color:transparent;
    text-align: center;
    margin-bottom: 3rem;
    animation: neonPulse 2.5s infinite alternate;
    line-height: 1.2;
    font-weight: 400;
}

@keyframes neonPulse {
    0% { text-shadow: 0 0 20px #00f3ff, 0 0 30px #00f3ff, 0 0 40px rgba(0, 243, 255, 0.8); }
    100% { text-shadow: 0 0 25px #00f3ff, 0 0 50px #00f3ff, 0 0 60px rgba(0, 243, 255, 0.98); }
}

.calculator-container {
    width: 100%;
    max-width: 900px; /* Reduced size for compactness */
    margin: 0 auto;
    position: relative;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 243, 255, 0.4);
    backdrop-filter: blur(25px);
    border: 3px solid rgba(0, 243, 255, 0.5);
    padding: 3rem 2.5rem; /* Adjusted padding for better right alignment */
    transition: all 0.5s ease;
}

.calculator-container:hover {
    box-shadow: 0 30px 60px rgba(0, 243, 255, 0.7), 0 0 40px rgba(0, 243, 255, 0.6);
    border-color: rgba(0, 243, 255, 0.7);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-group.full-width {
    grid-column: span 1;
}

.search-dropdown-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-bar {
    width: 100%;
    padding: 1.2rem 2.5rem;
    font-family: var(--text-font); /* Roboto Mono */
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.98);
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(0, 243, 255, 0.4);
    border-radius: 25px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
    outline: none;
}

.search-bar:focus {
    border-color: rgba(0, 243, 255, 0.7);
    box-shadow: 0 10px 25px rgba(0, 243, 255, 0.4), 0 0 18px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

.country-select {
    padding: 1.2rem 2.5rem;
    font-family: var(--text-font); /* Roboto Mono */
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.98);
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(0, 243, 255, 0.4);
    border-radius: 25px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
    appearance: none; /* Remove default dropdown arrow */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%2300f3ff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5rem;
    height: 60px; /* Fixed height for consistency */
}

/* Ensure dropdown opens downward */
.country-select::-ms-expand {
    display: none; /* For IE/Edge */
}

.country-select {
    -moz-appearance: none; /* Firefox */
    -webkit-appearance: none; /* Safari/Chrome */
    appearance: none;
}

.country-select[open] {
    border-radius: 25px 25px 0 0; /* Keep top rounded, open downward */
}

.country-select option {
    background: rgba(26, 26, 26, 0.95);
    color: rgba(255, 255, 255, 0.98);
    padding: 1.2rem 2.5rem;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2); /* Separator for options */
}

/* Highlight selected or matching option in dropdown */
.country-select option:checked, .country-select option:hover {
    background: rgba(0, 243, 255, 0.15);
    color: #ffffff;
}

.country-select:focus {
    border-color: rgba(0, 243, 255, 0.7);
    box-shadow: 0 10px 25px rgba(0, 243, 255, 0.4), 0 0 18px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

/* Expand dropdown when searching */
.country-select[size="1"]:focus {
    size: 10; /* Expand to show options when focused */
}

label {
    font-family: var(--title-font); /* Righteous */
    font-size: 1.4rem;
    color: rgba(0, 243, 255, 0.9);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.year-input-wrapper {
    position: relative;
    width: 100%;
}

.year-input {
    padding: 1.2rem 2.5rem;
    font-family: var(--text-font); /* Roboto Mono */
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.98);
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(0, 243, 255, 0.4);
    border-radius: 25px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
    appearance: none; /* Remove default number input arrows */
}

.year-input:focus {
    border-color: rgba(0, 243, 255, 0.7);
    box-shadow: 0 10px 25px rgba(0, 243, 255, 0.4), 0 0 18px rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

.year-input::-webkit-inner-spin-button,
.year-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.year-input[type=number] {
    -moz-appearance: textfield;
}

.calc-btn {
    background: linear-gradient(45deg, #00f3ff, #00ff88);
    color: #ffffff;
    border: none;
    padding: 1.5rem 3.5rem;
    border-radius: 40px;
    cursor: pointer;
    font-family: var(--title-font); /* Righteous */
    font-size: 1.5rem;
    transition: all 0.5s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 243, 255, 0.4);
    display: block;
    margin: 2rem auto 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    outline: none;
    grid-column: span 1; /* Adjusted for compactness */
}

.calc-btn:hover, .calc-btn:focus {
    background: linear-gradient(45deg, #00ff88, #00f3ff);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.7), 0 0 35px rgba(0, 243, 255, 0.6);
    color: #ffffff;
    outline: none;
}

.calculator-result {
    margin-top: 2.5rem;
    padding: 2.5rem 2rem;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 243, 255, 0.3);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 243, 255, 0.4);
    transition: all 0.5s ease;
    text-align: left;
}

.calculator-result:hover {
    box-shadow: 0 20px 45px rgba(0, 243, 255, 0.5), 0 0 25px rgba(0, 243, 255, 0.4);
}

.result-text {
    font-family: var(--text-font); /* Roboto Mono */
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    line-height: 2;
    animation: fadeIn 1.5s ease-in-out;
    word-wrap: break-word;
    word-break: break-word;
}

.result-heading {
    font-family: var(--title-font); /* Righteous */
    font-size: 1.8rem;
    color: rgba(0, 243, 255, 0.98);
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 243, 255, 0.5);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.result-list {
    list-style: none;
    padding-left: 1.5rem;
    margin: 1.2rem 0;
}

.result-list li {
    font-family: var(--text-font); /* Roboto Mono */
    font-size: 1.4rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.98);
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 1rem;
    word-wrap: break-word;
    word-break: break-word;
}

.result-list li::before {
    content: '⚡';
    position: absolute;
    left: 0;
    color: rgba(0, 243, 255, 0.9);
    font-size: 1.2rem;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
    transition: color 0.5s ease;
}

.result-list li:hover::before {
    color: rgba(0, 255, 136, 0.9);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.7);
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(25px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments for all devices */
@media (min-width: 1025px) {
    #tech-multiplier {
        padding: 6rem 5%;
    }

    .calculator-container {
        max-width: 900px;
        padding: 3rem 2.5rem;
    }

    .calculator-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .calc-btn {
        grid-column: span 2;
    }
}

@media (max-width: 1024px) {
    #tech-multiplier {
        padding: 6rem 4%;
        min-height: 50vh;
    }

    .calculator-container {
        max-width: 800px;
        padding: 2.5rem 2rem;
    }

    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }

    .search-bar, .country-select, .year-input {
        font-size: 1.2rem;
        padding: 1rem 2rem;
    }

    label {
        font-size: 1.3rem;
    }

    .calc-btn {
        font-size: 1.4rem;
        padding: 1.2rem 3rem;
        margin: 1.8rem auto 0;
    }

    .result-text, .result-list li {
        font-size: 1.4rem;
        line-height: 1.8;
    }

    .result-heading {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    #tech-multiplier {
        padding: 5rem 3%;
        min-height: 50vh;
    }

    .calculator-container {
        max-width: 700px;
        padding: 2rem 1.5rem;
        border-radius: 25px;
    }

    .calculator-grid {
        gap: 1.5rem;
    }

    .search-bar, .country-select, .year-input {
        font-size: 1.1rem;
        padding: 0.9rem 1.8rem;
    }

    label {
        font-size: 1.2rem;
    }

    .calc-btn {
        font-size: 1.3rem;
        padding: 1rem 2.5rem;
        margin: 1.5rem auto 0;
    }

    .result-text, .result-list li {
        font-size: 1.3rem;
        line-height: 1.6;
    }

    .result-heading {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    #tech-multiplier {
        padding: 4rem 2%;
        min-height: 50vh;
    }

    .calculator-container {
        max-width: 100%;
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .search-bar, .country-select, .year-input {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }

    label {
        font-size: 1.1rem;
    }

    .calc-btn {
        font-size: 1.2rem;
        padding: 0.9rem 2rem;
        margin: 1.2rem auto 0;
    }

    .result-text, .result-list li {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    .result-heading {
        font-size: 1.4rem;
    }
}