/* --- Unit Converter Wrapper --- */
#uc-wrapper {
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #111827;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 2px solid #374151;
    color: white;
}

/* --- Category Tabs --- */
.uc-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 10px;
    margin-bottom: 25px;
}

@media (min-width: 600px) {
    .uc-tabs {
        grid-template-columns: repeat(4, 1fr);
    }
}

.uc-tab {
    background: #1f2937;
    color: #9ca3af;
    border: 1px solid #374151;
    padding: 12px 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.6rem;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.2s;
}

.uc-tab:hover {
    background: #374151;
    color: white;
}

.uc-tab.active {
    background: #10b981; /* Green */
    color: #064e3b;
    border-color: #059669;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* --- Converter Body --- */
.uc-body {
    width: 100%;
    background-color: #000;
    border: 4px solid #333;
    border-radius: 8px;
    padding: 30px;
    position: relative;
    /* Diagonal stripe background */
    background-image: repeating-linear-gradient(45deg, #050505 0, #050505 10px, #0a0a0a 10px, #0a0a0a 20px);
}

.uc-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

@media (min-width: 768px) {
    .uc-row {
        flex-direction: row;
        gap: 30px;
    }
}

/* --- Input Groups --- */
.uc-group {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uc-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    margin-left: 2px;
}

.uc-input {
    background-color: #1f2937;
    border: 2px solid #374151;
    color: #fff;
    padding: 15px;
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 1.5rem;
    border-radius: 6px;
    outline: none;
    width: 100%;
    text-align: right;
    transition: border-color 0.2s;
}

.uc-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.uc-select {
    background-color: #111;
    border: 1px solid #4b5563;
    color: #d1d5db;
    padding: 10px;
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.uc-select:hover {
    border-color: #6b7280;
}

/* --- Divider / Icon --- */
.uc-icon {
    font-size: 1.5rem;
    color: #4b5563;
    user-select: none;
}

/* --- Formula Display --- */
.uc-formula {
    margin-top: 25px;
    text-align: center;
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 0.8rem;
    color: #6b7280;
    border-top: 1px solid #333;
    padding-top: 15px;
    width: 100%;
}

.uc-formula span {
    color: #10b981;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #uc-wrapper { padding: 15px; }
    .uc-input { font-size: 1.2rem; }
    .uc-tabs { grid-template-columns: repeat(2, 1fr); }
}