:root {
    /* Gruvbox-inspired Palette */
    --bg: #282828;
    --bg-alt: #3c3836;
    --fg: #ebdbb2;
    --fg-dim: #928374;
    --accent: #fe8019;
    --yellow: #fabd2f;
    --red: #fb4934;
    --green: #b8bb26;
    --bg-soft: #3c3836;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-alt);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

h1 {
    color: var(--yellow);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--fg-dim);
    font-size: 0.875rem;
}

input,
textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--bg-soft);
    color: var(--fg);
    padding: 0.8rem;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.search-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-group input {
    padding-right: 2.5rem;
}

.search-clear {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--fg-dim);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.search-clear:hover {
    color: var(--red);
}

h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--accent);
    letter-spacing: 0.1rem;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 1rem;
}

.btn:hover {
    opacity: 0.9;
}

.btn:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--fg-dim);
    margin-top: 1rem;
}

.btn-danger {
    background: var(--red);
    color: var(--bg);
    margin-top: 1rem;
}

.btn-ghost {
    background: transparent;
    color: var(--fg-dim);
    border: 1px solid var(--fg-dim);
    margin-top: 0.5rem;
}

/* List Items */
.bundle-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    max-height: 40vh;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for Gruvbox style */
.bundle-list::-webkit-scrollbar {
    width: 4px;
}

.bundle-list::-webkit-scrollbar-track {
    background: var(--bg);
}

.bundle-list::-webkit-scrollbar-thumb {
    background: var(--bg-alt);
    border-radius: 4px;
}

.bundle-list::-webkit-scrollbar-thumb:hover {
    background: var(--fg-dim);
}

.bundle-item {
    background: var(--bg);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: border-color 0.2s;
    cursor: pointer;
}

.bundle-item:hover {
    border-color: var(--accent);
}

.bundle-name {
    font-weight: 500;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 1rem;
    flex: 1;
    font-size: 0.875rem;
}

.bundle-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--bg-soft);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.error {
    color: var(--red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.success {
    color: var(--green);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .container {
        border-radius: 0;
        min-height: 100vh;
        padding: 2rem 1.5rem;
    }
}