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

:root {
    --rose: #f43f5e;
    --pink: #ec4899;
    --rose-light: #fda4af;
    --pink-dark: #db2777;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* Ad Placeholders */
.ad-placeholder {
    background: var(--gray-200);
    border: 2px dashed var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0 auto;
    border-radius: 8px;
}

.ad-top {
    max-width: 728px;
    height: 90px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.ad-mid {
    max-width: 300px;
    height: 250px;
    margin: 40px auto;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--rose) 0%, var(--pink) 50%, var(--rose-light) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: var(--white);
    padding: 80px 20px 60px;
    text-align: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Input Section */
.input-section {
    background: var(--white);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-group input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--rose);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose), var(--pink));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 63, 94, 0.3);
}

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

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: var(--gray-700);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--rose);
    color: var(--rose);
}

/* Filters Section */
.filters-section {
    margin-bottom: 32px;
}

.filters-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: var(--gray-600);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag:hover {
    border-color: var(--pink);
    color: var(--pink);
}

.filter-tag.active {
    background: linear-gradient(135deg, var(--rose), var(--pink));
    color: var(--white);
    border-color: transparent;
}

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.results-actions {
    display: flex;
    gap: 8px;
}

.titles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Title Card */
.title-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--white);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.title-card .title-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-800);
}

.title-card .title-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pink);
    background: rgba(236, 72, 153, 0.1);
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

.title-card .title-actions {
    display: flex;
    gap: 8px;
}

.title-card .title-actions button {
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-card .title-actions button:hover {
    background: var(--gray-100);
    color: var(--rose);
}

.title-card .title-actions button.favorited {
    color: var(--rose);
}

.title-card .title-actions button.favorited svg {
    fill: var(--rose);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
    font-size: 0.875rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

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

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-actions {
        width: 100%;
    }

    .results-actions button {
        flex: 1;
        justify-content: center;
    }

    .title-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .title-card .title-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
