:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #f4f4f5;
    --text-main: #18181b;
    --text-muted: #71717a;
    --bg-main: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

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

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

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

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #c7d2fe;
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #fbcfe8;
    bottom: -50px;
    left: -50px;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #bae6fd;
    top: 40%;
    left: 10%;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 1;
}

.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

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

.generator-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #3f3f46;
}

.input-group input,
.input-group textarea {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e4e4e7;
    background: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: #a1a1aa;
}

.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
}

.primary-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

.primary-button svg {
    width: 20px;
    height: 20px;
}

/* Output Section */
.output-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e4e4e7;
    animation: fadeIn 0.6s ease-out;
}

.output-section.hidden {
    display: none;
}

@keyframes fadeIn {
    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: 20px;
}

.output-header h2 {
    font-size: 1.5rem;
    color: #18181b;
}

.secondary-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f4f5;
    color: #27272a;
    border: 1px solid #e4e4e7;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-button:hover {
    background: #e4e4e7;
}

.secondary-button svg {
    width: 16px;
    height: 16px;
}

.result-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    white-space: pre-wrap;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
    max-height: 700px;
    overflow-y: auto;
    font-family: 'Noto Sans JP', sans-serif;
}

.result-content h2 {
    font-size: 1.6rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin: 32px 0 16px;
    color: var(--text-main);
}

.result-content h3 {
    font-size: 1.3rem;
    margin: 24px 0 12px;
    color: #475569;
    position: relative;
    padding-left: 12px;
}

.result-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.result-content p {
    margin-bottom: 1.2em;
}

.output-footer {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 40px 16px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .generator-card {
        padding: 24px;
    }

    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .secondary-button {
        width: 100%;
        justify-content: center;
    }
}