@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --primary-color: #6200ee;
    --secondary-color: #03dac6;
    --card-bg: #1e1e1e;
    --input-bg: #2c2c2c;
    --border-color: #333;
    --bg-gradient: linear-gradient(135deg, #121212 0%, #1e1e1e 100%);
}

body.light-mode {
    --background-color: #f5f7fa;
    --text-color: #2d3436;
    --primary-color: #4834d4;
    --secondary-color: #22a6b3;
    --card-bg: #ffffff;
    --input-bg: #f1f2f6;
    --border-color: #dfe6e9;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: var(--bg-gradient);
    transition: all 0.3s ease;
}

#app {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#theme-toggle {
    background: var(--input-bg);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    color: var(--text-color);
}

#theme-toggle:hover {
    transform: scale(1.05);
}

.category-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    background: var(--input-bg);
    padding: 5px;
    border-radius: 12px;
}

.cat-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.cat-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(98, 0, 238, 0.3);
}

.converter-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

input, select {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary-color);
}

input[readonly] {
    cursor: default;
    background: var(--input-bg);
    font-weight: 600;
}

.equals {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 5px 0;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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