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

:root {
    --primary: #ff6154;
    --primary-dark: #e54d42;
    --bg: #fafafa;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --text-light: #666;
    --border: #e5e5e5;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.credit {
    font-size: 0.875rem;
    color: var(--text-light);
}

.credit a {
    color: var(--primary);
    text-decoration: none;
}

.credit a:hover {
    text-decoration: underline;
}

/* URL Input Section */
.url-input-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.url-input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.url-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.url-input-wrapper input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.url-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 97, 84, 0.1);
}

.btn-fetch {
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

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

.btn-fetch:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.url-hint {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: #999;
}

/* Form */
form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.auto-filled-notice {
    background: #ecfdf5;
    color: #047857;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 97, 84, 0.1);
}

input::placeholder, textarea::placeholder {
    color: #999;
}

.btn-generate {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

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

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

/* Results */
.results {
    margin-top: 2rem;
}

.results h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.comment-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.comment-label {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
}

.template-desc {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-style: italic;
}

.char-count {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.comment-content {
    white-space: pre-wrap;
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text);
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #e5e7eb;
}

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

/* Tips Box */
.tips-box {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.tips-box h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #92400e;
}

.tips-box ul {
    list-style: none;
    font-size: 0.875rem;
    color: #78350f;
}

.tips-box li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.tips-box li:before {
    content: "→ ";
    color: #d97706;
}

/* Restart Button */
.btn-restart {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    color: var(--text-light);
    border: 2px dashed var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1.5rem;
}

.btn-restart:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.875rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #999;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
}

.toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(1rem);
    pointer-events: none;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .url-input-wrapper {
        flex-direction: column;
    }
    
    .btn-fetch {
        width: 100%;
    }
    
    form, .url-input-section {
        padding: 1.5rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* SEO Content */
.seo-content {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.seo-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.seo-content h3 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.75rem;
}

.seo-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.seo-content ul {
    list-style: none;
    margin-left: 0;
}

.seo-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.seo-content strong {
    color: var(--text);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
}
.cta-box p { font-size: 1.1rem; margin-bottom: 1rem; font-weight: 500; }
.cta-box .btn { margin: 0.25rem; display: inline-flex; align-items: center; padding: 0.75rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 500; }
.cta-box .btn-primary { background: white; color: #ea580c; }
.cta-box .btn-outline { border: 2px solid white; color: white; background: transparent; }
