* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    transition: background 0.5s ease, color 0.5s ease;
}

body.light-mode {
    background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    color: #1a1a1a;
}

.container {
    background: rgba(30, 30, 30, 0.7);
    border-radius: 1.5rem;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

.light-mode .container {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.input-group {
    margin-bottom: 1rem;
    position: relative;
}

label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: #e0e0e0;
    transition: color 0.5s ease;
}

.light-mode label {
    color: #1a1a1a;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.light-mode input {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 191, 165, 0.2);
}

.input-button {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.light-mode .input-button {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

.input-button:hover {
    background: rgba(0, 191, 165, 0.2);
    transform: translateY(-2px);
}

.dropdown-container {
    position: relative;
    width: 100%;
}

.dropdown-selected {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.light-mode .dropdown-selected {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

.dropdown-selected:hover, .dropdown-selected:focus {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 191, 165, 0.2);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.9);
    border-radius: 0.75rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    margin-top: 0.4rem;
    overflow: hidden;
    z-index: 100;
    animation: slideDown 0.3s ease forwards;
    transform-origin: top;
}

.light-mode .dropdown-menu {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.8rem;
    color: #e0e0e0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.light-mode .dropdown-item {
    color: #1a1a1a;
}

.dropdown-item:hover {
    background: rgba(0, 191, 165, 0.2);
}

.toggle-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #555;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: #e0e0e0;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: #00BFA5;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    transition: all 0.5s ease;
    animation: slideUp 0.5s ease forwards;
}

.light-mode .result-card {
    background: rgba(0, 0, 0, 0.05);
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    font-size: 1rem;
}

.footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.footer a {
    color: #00BFA5;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.light-mode .footer a {
    color: #00796B;
}

.footer a:hover {
    text-decoration: underline;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

.light-mode .modal-content {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.light-mode .modal-close {
    color: #1a1a1a;
}

.modal-close:hover {
    color: #00BFA5;
}

.light-mode .modal-close:hover {
    color: #00796B;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: scaleY(0);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        max-width: 95%;
    }

    h1 {
        font-size: 1.8rem;
    }

    input, .dropdown-selected {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .input-button {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .result-item {
        font-size: 0.9rem;
    }

    .footer {
        font-size: 0.8rem;
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 90%;
    }

    .modal-content h2 {
        font-size: 1.3rem;
    }

    .modal-content p {
        font-size: 0.8rem;
    }

    .toggle-container {
        top: 0.75rem;
        right: 0.75rem;
    }
}