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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 40px;
}

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

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.input-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.input-options button {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.input-options button.active {
    background: #667eea;
    color: white;
}

.input-options button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#contentInput {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#contentInput:focus {
    outline: none;
    border-color: #667eea;
}

.parameters-section {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.parameters-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #555;
}

.parameter-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.parameter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.parameter-item label {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.parameter-item input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.parameter-item input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.parameter-unit {
    color: #888;
    font-size: 0.9em;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.radio-option input[type="radio"] {
    margin-top: 3px;
    cursor: pointer;
}

.radio-option span {
    font-weight: 500;
    color: #333;
}

.radio-option small {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 3px;
}

.radio-option:has(input:checked) {
    border-color: #667eea;
    background: #f5f7ff;
}

.parameters-section h3:not(:first-child) {
    margin-top: 20px;
}

.wordpress-input {
    margin-top: 20px;
    padding: 20px;
    background: #f5f7ff;
    border: 2px solid #667eea;
    border-radius: 8px;
}

.wordpress-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
}

.wordpress-input input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

.wordpress-input input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.load-btn {
    padding: 10px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.load-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.status-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.status-message.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

.generate-btn {
    margin-top: 20px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.metrics-display {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.metric-item {
    text-align: center;
}

.metric-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.metric-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.preview-item {
    text-align: center;
}

.preview-item h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.2em;
}

.canvas-container {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.canvas-container canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.download-btn {
    padding: 10px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }
}
