html {
    position: relative;
    font-size: 14px;
}

html, body {
    margin: 0;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

:root {
    --primary-gradient: linear-gradient(135deg, #febe10 0%, #E4AB0E 100%);
    --secondary-gradient: linear-gradient(135deg, #febe10 0%, #E4AB0E 100%);
    --accent-gradient: linear-gradient(135deg, #febe10 0%, #E4AB0E 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 4px 32px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 10px 60px rgba(0, 0, 0, 0.4);
    --text-primary: #2d3748;
    --text-secondary: #718096;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* Generated from https://cssgradient.io/gradient-backgrounds/ */
    background: linear-gradient(45deg, rgb(0, 17, 39) 0%, rgb(0, 17, 39) 7.692%, rgb(0, 19, 42) 7.692%, rgb(0, 19, 42) 15.385%, rgb(0, 21, 45) 15.385%, rgb(0, 21, 45) 23.077%, rgb(0, 23, 48) 23.077%, rgb(0, 23, 48) 30.769%, rgb(0, 25, 52) 30.769%, rgb(0, 25, 52) 38.462%, rgb(0, 28, 55) 38.462%, rgb(0, 28, 55) 46.154%, rgb(0, 30, 59) 46.154%, rgb(0, 30, 59) 53.846%, rgb(2, 32, 63) 53.846%, rgb(2, 32, 63) 61.538%, rgb(5, 35, 67) 61.538%, rgb(5, 35, 67) 69.231%, rgb(7, 37, 71) 69.231%, rgb(7, 37, 71) 76.923%, rgb(10, 40, 75) 76.923%, rgb(10, 40, 75) 84.615%, rgb(12, 42, 79) 84.615%, rgb(12, 42, 79) 92.308%, rgb(15, 45, 83) 92.308%, rgb(15, 45, 83) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

    body::before {
        content: '';
        position: fixed;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 50%), radial-gradient(circle at 40% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
        transform-origin: center center;
        animation: float 20s ease-in-out infinite;
        pointer-events: none;
        z-index: 0;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) ;
    }

    33% {
        transform: translateY(-40px) rotate(1deg);
    }

    66% {
        transform: translateY(40px) rotate(-1deg);
    }
}

.navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
    position: relative;
}

    .nav-link::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: white;
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .nav-link:hover {
        color: white !important;
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }

        .nav-link:hover::before {
            width: 80%;
        }

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    justify-content: center;
    padding: 2rem 2rem;
}

.content-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: clamp(1rem, 2.5vw, 3rem);
    box-shadow: var(--shadow-strong);
    width: min(90%, 1000px);
    margin: 0 auto;
    animation: slideUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
    justify-self: center;
}

@media (min-width: 768px) {
    .main-container {
        flex-direction: row; 
        padding: 3rem 2rem;
    }

    .content-wrapper {
        padding: 3rem; 
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.footer {
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    position: relative !important;
}

    .footer a {
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        transition: all 0.3s ease;
    }

        .footer a:hover {
            color: white;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        }

@media (max-width: 768px) {
    .content-wrapper {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 9999;
    transition: width 0.3s ease;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
    position: relative;
}

    .page-title h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        background: linear-gradient(135deg, #fff, #e2e8f0);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: titleGlow 2s ease-in-out infinite alternate;
    }

    .page-title p {
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.8);
        font-weight: 300;
    }

@keyframes titleGlow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }

    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    }
}

.converter-form {
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
}

    .form-input::placeholder {
        color: rgba(255, 255, 255, 0.6);
        font-weight: 400;
    }

    .form-input:focus {
        border-color: rgba(255, 255, 255, 0.6);
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-input:focus + .input-icon {
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.convert-btn {
    flex: auto;
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.1);
}

    .convert-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s ease;
    }

    .convert-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(79, 172, 254, 0.4);
    }

        .convert-btn:hover::before {
            left: 100%;
        }

    .convert-btn:active {
        transform: translateY(-1px);
    }

    .convert-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }

.result-section {
    margin-top: 2.5rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

    .result-section.show {
        opacity: 1;
        transform: translateY(0);
    }

.result-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.result-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: valueAppear 0.6s ease-out;
}

@keyframes valueAppear {
    from {
        opacity: 0;
        transform: scale(0.6);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.validation-error {
    display:block;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 1rem 1rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: errorShake 2s ease-in-out;
}

.validation-error:empty {
    display: none;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.loading-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

    .feature-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-5px);
    }

.feature-icon {
    font-size: 2rem;
    color: #4facfe;
    margin-bottom: 1rem;
}

.feature-title {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .page-title h1 {
        font-size: 2rem;
    }

    .form-input, .convert-btn {
        font-size: 1rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}