:root {
    --primary: #636E72;
    --primary-dark: #2D3436;
    --secondary: #B2BEC3;
    --accent: #00B894;
    --accent-hover: #00A383;
    --background: #0F1215;
    --surface: #1A1D21;
    --border: #2D3436;
    --text-main: #FFFFFF;
    --text-muted: #B2BEC3;
    --radius: 12px;
    --transition: 250ms ease;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.app-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo i {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.logo h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #FFF;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Cards & Glassmorphism */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

.card {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Input Section */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header label {
    font-weight: 600;
    color: var(--secondary);
}

.actions {
    display: flex;
    gap: 0.5rem;
}

textarea {
    width: 100%;
    min-height: 250px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 184, 148, 0.1);
}

.stats-bar {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    color: var(--accent);
    font-weight: 600;
}

/* Grid Layout */
.utilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .utilities-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Buttons */
.btn-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent);
    color: #FFF;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--primary);
    color: #FFF;
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
}

.btn-util {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-util:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
}

.btn-icon {
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 6px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
}

.btn-icon i {
    width: 18px;
    height: 18px;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-field {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    width: 100%;
}

.input-field:focus {
    border-color: var(--accent);
}

.flex-row {
    display: flex;
    gap: 0.75rem;
}

.btn-row {
    display: flex;
    gap: 0.75rem;
}

.flex-1 { flex: 1; }
.w-full { width: 100%; }

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.checkbox-group input {
    accent-color: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}
