:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --danger: #e74c3c;
    --success: #2ecc71;
    --bg: #f4f7f6;
    --text: #333;
}

/* Reset & Base */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 15px;
    display: flex;
    justify-content: center;
}

.container {
    background: white;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Mobile First: Stacked Input */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* Prevents iOS zoom on focus */
}

.add-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* Desktop/Tablet: Side-by-Side Input */
@media (min-width: 480px) {
    .input-group {
        flex-direction: row;
    }
    .add-btn {
        width: auto;
    }
}

/* UI Elements */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: #ebf5fb;
    color: var(--accent);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #d6eaf8;
}

.output-box {
    background: #f8f9fa;
    border-left: 5px solid var(--primary);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.clear-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: 1px solid #ccc;
    color: #888;
    border-radius: 6px;
}

/* Autofill Fix */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
}