:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #4f46e5;
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #7c3aed;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #2563eb;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, 50px) scale(1.1);
    }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

.header-icon {
    margin-bottom: 16px;
}

.header-icon img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

header h1 span {
    color: var(--primary);
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 24px;
}

.input-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dim);
}

select {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

select:focus {
    border-color: var(--primary);
    outline: none;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.primary-btn {
    flex-grow: 2;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.prefix {
    color: var(--text-dim);
    margin-right: 2px;
}

input[type="text"] {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    padding: 12px 8px;
    flex-grow: 1;
    font-size: 1rem;
}

.primary-btn:hover {
    background: var(--primary-hover);
}

.primary-btn:active {
    transform: scale(0.98);
}

/* SNS Brand Colors */
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: inline-block;
}

.badge-note {
    background: #4f46e5;
    color: white;
}

.badge-zenn {
    background: #3ea8ff;
    color: white;
}

.badge-qiita {
    background: #55c500;
    color: white;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.secondary-btn:active {
    transform: scale(0.98);
}

.search-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.search-wrapper input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px 14px 48px;
    color: var(--text-main);
}

.search-wrapper input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.2rem;
}

.stats {
    font-size: 0.875rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.text-link-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.text-link-btn:hover {
    background: rgba(79, 70, 229, 0.1);
    text-decoration: underline;
}

.text-link-btn.hidden {
    display: none;
}

.results-list {
    display: grid;
    gap: 16px;
}

.article-item-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.article-item {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
    color: inherit;
}


.article-item:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary);
}

.article-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.article-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 60px 0;
    color: var(--text-dim);
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.hidden {
    display: none;
}

.loader-content {
    text-align: center;
}

.loader-text {
    margin-top: 16px;
    color: var(--text-main);
    font-weight: 500;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}