/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;700&family=Lexend+Deca:wght@400;600&display=swap');

/* Root Variables */
:root {
    --primary-bg: linear-gradient(135deg, #0D1B2A, #1B263B, #415A77);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.3);
    --button-glow: rgba(0, 255, 255, 0.9);
    --text-color: #ffffff;
    --hover-glow: 0px 0px 20px rgba(0, 255, 255, 1);
}

/* Main Converter Container */
.cmtx-converter {
    max-width: 100%;
    width: 100%;
    margin: auto;
    padding: 20px;
    background: var(--primary-bg);
    border-radius: 20px;
    box-shadow: 0px 10px 60px rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    text-align: center;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

/* Section Box */
.cmtx-section {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    padding: 28px;
    margin-top: 45px;
    backdrop-filter: blur(15px);
}

/* Custom Title & Subheadings */
cmtx-title {
    font-size: clamp(24px, 5vw, 44px); /* Responsive font size */
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 20px; /* Added spacing below the title */
}

.cmtx-highlight {
    color: #ff8fc3; /* Change this to any color you prefer */
}



input, textarea, select {
   height: auto;
   max-width: 100%;
   box-shadow: 0 2px 7px -4px rgb(0 0 0 / 10%);
   background: #818181d6 !important;
}

cmtx-subheading {
    font-size: clamp(16px, 4vw, 20px); /* Responsive font size */
    font-weight: 600;
    margin-bottom: 10px;
    color: #E0E0E0;
}

/* Custom Text (Replaces <p>) */
cmtx-text {
    font-size: clamp(14px, 3vw, 18px); /* Responsive font size */
    font-weight: 400;
    color: #E0E0E0;
    display: block;
    margin-bottom: 10px;
}

/* Dropdowns */
.cmtx-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Auto-fit columns */
    gap: 15px;
}

.cmtx-settings select {
    width: 100%;
    padding: 12px;
    font-size: clamp(14px, 2vw, 17px); /* Responsive font size */
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    outline: none;
    backdrop-filter: blur(12px);
}

/* Input Field */
.cmtx-input {
    width: 100%;
    padding: 15px;
    font-size: clamp(16px, 3vw, 30px); /* Responsive font size */
    border: none;
    height: auto; /* Height is now auto */
    font-family: 'eicons';
    font-weight: 900;
    border-radius: 12px;
    text-align: center;
    background: rgb(255 255 255 / 27%);
    color: #ffffff;
    outline: none;
    margin-bottom: 20px;
}

/* Buttons */
.cmtx-button-group {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    gap: 10px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--c-contrast-400);
    color: #ffffff;
}

.cmtx-button {
    flex: 1; /* Buttons will grow to fill available space */
    min-width: 150px; /* Minimum width for buttons */
    height: 45px;
    font-size: clamp(14px, 2vw, 18px); /* Responsive font size */
    border-radius: 12px;
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    color: var(--text-color);
    text-align: center;
    transition: all 0.3s ease; /* Smooth hover effect */
}

/* Button Hover Effects */
.cmtx-button:hover {
    background: var(--button-glow);
    box-shadow: var(--hover-glow);
    transform: translateY(-3px);
}

/* History Buttons */
.cmtx-history-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 10px;
    width: 100%;
}

.cmtx-history-buttons .cmtx-button {
    flex: 1; /* Buttons will grow to fill available space */
    min-width: 150px; /* Minimum width for buttons */
    height: 45px;
}

/* Result Styling */
cmtx-result {
    font-size: 16px; /* Default font size for surrounding text */
    font-weight: 400;
    color: #ffffff;
    display: block;
    margin-top: 10px;
    margin-bottom: 15px;
    text-align: center;
}

/* Numeric Result (Targeted Styling) */
cmtx-result .numeric-value {
    font-size: clamp(24px, 5vw, 32px); /* Responsive font size for numeric value */
    font-weight: 700; /* Make the number bold for emphasis */
    color: #00ffff; /* Optional: Highlight the numeric value with a different color */
}

/* Responsive Design */
@media (max-width: 768px) {
    .cmtx-settings {
        grid-template-columns: 1fr;
    }

    .cmtx-button-group,
    .cmtx-history-buttons {
        flex-direction: column;
    }

    .cmtx-button,
    .cmtx-history-buttons .cmtx-button {
        width: 100%;
        min-width: unset;
        padding: 1px; /* Adjusted padding */
        font-size: clamp(14px, 3vw, 16px);
    }

    cmtx-title {
        font-size: clamp(20px, 5vw, 28px); /* Slightly smaller font size */
    }

    cmtx-subheading {
        font-size: clamp(14px, 4vw, 18px); /* Slightly smaller font size */
    }
}

@media (max-width: 480px) {
    .cmtx-converter {
        padding: 15px; /* Further reduced padding for very small screens */
    }

    .cmtx-section {
        padding: 10px; /* Further reduced padding for very small screens */
    }

    .cmtx-input {
        padding: 24px;
        font-size: 23px;
    }

    .cmtx-button {
        height: 40px;
        font-size: clamp(12px, 3vw, 14px);
        padding: 1px; /* Reduced padding further */
    }

    .cmtx-button-group,
    .cmtx-history-buttons {
        gap: 8px; /* Reduced gap between buttons */
    }

    cmtx-title {
        font-size: clamp(18px, 5vw, 24px); /* Even smaller font size */
    }

    cmtx-subheading {
        font-size: clamp(12px, 4vw, 16px); /* Even smaller font size */
    }
}