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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 40px;
    font-size: 1.1em;
}

.input-section {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #34495e;
    font-size: 1.1em;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

.optimize-btn {
    display: block;
    width: 200px;
    margin: 0 auto 30px;
    padding: 15px 30px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.optimize-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.optimize-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    color: #3498db;
    font-size: 1.1em;
    margin: 20px 0;
}

.loading span {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.output-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.output-section h2 {
    color: #27ae60;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.output-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #2c3e50;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.output-text strong {
    color: #e74c3c;
    font-weight: 700;
}

.output-text b {
    color: #3498db;
    font-weight: 600;
}

.output-text em {
    color: #9b59b6;
    font-style: italic;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-top: 20px;
    border-left: 4px solid #c33;
}

.hidden {
    display: none;
}

.output-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.output-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.output-item h3 {
    color: #34495e;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.copyable-field {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 10px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.95em;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
}

.copy-btn {
    padding: 8px 20px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #229954;
}

#seoTitle {
    font-weight: 600;
    color: #2c3e50;
}

#metaDescription {
    color: #555;
}

#keywords {
    color: #3498db;
}

.output-text h1, .output-text h2, .output-text h3 {
    margin: 15px 0 10px 0;
    color: #2c3e50;
}

.output-text h1 {
    font-size: 1.8em;
}

.output-text h2 {
    font-size: 1.4em;
}

.output-text h3 {
    font-size: 1.2em;
}