/* Light & Dark Theme Colors */
:root {
    --bg-color: #f8fafc;
    --container-color: #ffffff;
    --text-color: #1e293b;
    --primary-blue: #2563eb;
    --dark-blue: #1e40af;
    --error-red: #dc2626;
    --input-border: #cbd5e1;
    --transition: all 0.3s ease-in-out;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --container-color: #1e293b;
    --text-color: #f8fafc;
    --input-border: #334155;
}

/* General Body Styles */
body {
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: grid;
    place-items: center;
    margin: 0;
    transition: var(--transition);
}

/* Main Container */
.container {
    background: var(--container-color);
    width: min(90%, 450px); /* Width increased to 450px */
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border: 1px solid var(--input-border);
    transition: var(--transition);
}

/* Input Groups */
.input-group {
    margin: 1.5rem 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--input-border);
    border-radius: 0.5rem;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Result Section */
#result {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--bg-color);
    text-align: center;
    font-weight: 600;
    min-height: 3rem;
    display: grid;
    place-items: center;
}

/* Buttons */
.btn-group {
    display: grid;
    gap: 0.75rem;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--dark-blue);
}

.btn-secondary {
    background: #475569;
    color: white;
}

/* Theme Toggle Button */
.theme-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--container-color);
    border: 1px solid var(--input-border);
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}
