/* Font Face Definitions */
@font-face {
    font-family: 'inter-regular';
    src: url('./assets/fonts/static/Inter_18pt-Regular.ttf') format('truetype');
}

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

/* Body Styles */
body {
    margin: 0;
    gap: 100px;
    flex: 1;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 400ms ease-in-out;
    font-family: Arial, sans-serif;
    background-size: 150%;         
    background-position: center;    
    animation: gradientBG 20s ease;
    background-image: url('/public/image/background.jpg');
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.headline {
    width: 20%;
    font-size: 70px;
    font-weight: 600;
    color: #fff;
    text-shadow:
        0 0 10px rgb(0, 162, 255),
        0 0 20px rgb(0, 162, 255),
        0 0 40px rgb(0, 162, 255),
        0 0 60px rgb(0, 162, 255);
}

.converter-container {
    z-index: 10;
    width: 28em;
    padding: 1.5em;
    border-radius: 20px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgb(255, 255, 255, 0.4);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.4);
}

.converter-container::before {
    content: '';
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    transition: 0.2s;
    position: absolute;
    pointer-events: none;
    transform: skewX(-15deg);
    background: rgba(255, 255, 255, 0.05);
}

.converter-container:hover::before {
    left: 120%;
}

/* Title */
.converter-container h2 {
    margin-bottom: 1em;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
    ;
}

/* Input field */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-amount {
    position: relative;
}

.input-amount input {
    width: 100%;
    margin: 1em 0;
    border: none;
    outline: none;
    color: white;
    font-size: 16px;
    padding: 15px 20px;
    border-radius: 35px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.converter-container input:hover {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.4);
}

.converter-container input:focus {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.input-amount label {
    top: 50%;
    left: 30px;
    font-size: 16px;
    position: absolute;
    pointer-events: none;
    transition: all 0.3s ease;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
}

.input-amount input:focus+label,
.input-amount input:not(:placeholder-shown)+label {
    top: 25%;
    left: 15px;
    padding: 2px 8px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
}

/* Currency selects */
.currency-select {
    gap: 1em;
    display: flex;
    margin-top: 0em;
}

.field-from,
.field-to {
    flex: 1;
    padding-left: 0;
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.custom-dropdown {
    position: relative;
    width: 100%;
    border: none;
    color: white;
    font-size: 16px;
    padding: 15px 20px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.3) url("data:image/svg+xml;utf8,<svg fill='white' height='20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>") no-repeat right 15px center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.custom-dropdown:active {
    transform: scale(1.02);
} 

.custom-dropdown .selected-option {
    display: block;
}

.custom-dropdown .options {
    position: absolute;
    top: 100%; 
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: rgb(34, 34, 34);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none; 
}

.custom-dropdown .options div.option {
    padding: 10px 20px;
    cursor: pointer;
}

.custom-dropdown .options div.option:hover {
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.custom-dropdown:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.field-from label,
.field-to label {
    display: block;
    margin-top: 0;
    margin-bottom: 0.5em;
    margin-left: 1em;
    font-size: 16px;
    font-weight: 600;
}

/* Buttons */
.button-group {
    gap: 3em;
    width: 100%;
    display: flex;
    margin-top: 1.2em;
    justify-content: center;
}

.button-group button {
    flex: 1;
    border: none;
    outline: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 0.6em 1em;
    border-radius: 35px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.button-group button:hover {
    transition: all 0.3s ease;
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.button-group button:active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.01);
}

/* Exchange result box */
.exchange-result {
    margin-top: 2em;
    cursor: default;
    font-size: 18px;
    margin-bottom: 2em;
    padding-top: 20px;
    font-weight: 600;
    border-radius: 5px;
    padding-bottom: 20px;
    color: rgb(41, 40, 40);
    background-color: rgba(224, 224, 233, 0.5);
}

/* Footer */
.footer {
    font-size: 0.75rem;
    margin-top: 1em;
    color: #ddd;
}

@media (max-width: 1024px) {
  body {
    display: flex;
    flex-direction: column; 
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    padding: 2rem 1rem; 
    height: auto; 
  }

  .headline {
    width: 80%;
    text-align: center;
    font-size: 3rem; 
  }

  .converter-container {
    width: 70%; 
    max-width: 500px; 
    margin: 0 auto;
  }
}
