@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: rgba(30, 30, 30, 0.6);
    --bg-input: rgba(40, 40, 40, 0.5);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent: #ffffff;
    --success: #10b981;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(40, 80, 60, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.input-group {
    margin-bottom: 0;
    flex: 1;
}

.input-group.input-small {
    max-width: 110px;
}

.input-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-row .input-group {
    flex: 1;
    min-width: 120px;
}

.class-entry {
    margin-bottom: 0.75rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.class-entry:hover {
    border-color: var(--border-hover);
    background: rgba(30, 30, 30, 0.8);
}

#classesContainer {
    margin-bottom: 0.75rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 400;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--border-hover);
    background: rgba(50, 50, 50, 0.6);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.btn-generate {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--accent);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-generate:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-add {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-remove {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1.25rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    margin-bottom: 0;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: scale(1.05);
}

.btn-remove:active {
    transform: scale(0.95);
}

.class-entry:first-child .btn-remove {
    visibility: hidden;
}

.output {
    margin-top: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    animation: slideIn 0.4s ease;
}

.output.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.output-title {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-hover);
}

.btn-copy.copied {
    background: var(--success);
    border-color: var(--success);
}

pre {
    background: transparent;
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .card {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .input-row {
        flex-direction: column;
    }

    .input-row .input-group {
        min-width: 100%;
        max-width: 100%;
    }
}