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


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding: 10px;
    margin-top: 1rem;
    scroll-behavior: smooth;
    text-align: center;
}

.converter-container {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    border-radius: 20px;
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    text-align: center;
    transition: box-shadow 0.2s;
}
.converter-container:focus-within {
    box-shadow: 0 0 0 3px #7c3aed55;
}

.converter-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    text-align: center;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.input-field {
    width: 160px;
    padding: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: border-color 0.2s, background 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px #7c3aed55;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.convert-btn, .reset-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    outline: none;
}

.convert-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #7c3aed;
    border: 2px solid transparent;
}

.reset-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
}

.convert-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: #7c3aed;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.convert-btn:active, .reset-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.results-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    min-height: 9rem;
    transition: border-color 0.2s, background 0.2s;
}

.result-category h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-align: center;
    letter-spacing: 0.5px;
}

.result-values {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.result-line {
    margin-bottom: 0.25rem;
}

.result-line:last-child {
    margin-bottom: 0;
}

.separator {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0.5rem;
    -webkit-user-select: none;
    user-select: none;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        margin: 1rem;
        text-align: center;
    }

    .converter-container {
        padding: 2rem;
        margin-bottom: 1.5rem;
    }

    .converter-title {
        font-size: 1.875rem;
        margin-bottom: 2rem;
    }

    .input-field {
        width: 180px;
        font-size: 3rem;
        padding: 1.25rem;
    }

    .result-category {
        padding: 1.5rem;
    }

    .result-category h3 {
        font-size: 1rem;
    }

    .result-values {
        font-size: 1rem;
    }
    .results-container {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        margin: 0.5rem;
        text-align: center;
    }

    .converter-title {
        font-size: 1.5rem;
    }

    .input-field {
        width: 160px;
        font-size: 2.5rem;
    }

    .convert-btn, .reset-btn {
        padding: 0.875rem 2rem;
        font-size: 1.125rem;
    }

    .button-group button {
        width: 100%;
        max-width: 200px;
    }
    .results-container {
        margin-bottom: 1.25rem;
    }
}

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

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