@import url('https://fonts.googleapis.com/css2?family= Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem 1rem;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #818cf8, #34d399);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.category-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.category-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e2e8f0;
}

.category-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.25rem;
    background: var(--primary);
    border-radius: 2px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 120px;
}

.en-text {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.ko-text {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 300;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.5);
}

.tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.tag.active .en-text,
.tag.active .ko-text {
    color: white;
    opacity: 1;
}

.prompt-output-section {
    position: sticky;
    top: 1rem;
    z-index: 100;
    margin-bottom: 2rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: fadeInDown 0.8s ease-out;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.output-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prompt-display {
    width: 100%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1rem;
    color: var(--text-main);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.prompt-display:empty::before {
    content: 'Select tags to build your prompt...';
    color: var(--text-muted);
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--accent);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(150%);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}