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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 28px;
}

h2 {
    color: #34495e;
    margin: 25px 0 15px 0;
    font-size: 22px;
}

h3 {
    color: #555;
    margin: 15px 0 10px 0;
    font-size: 18px;
}

.instructions {
    color: #666;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #e8f4f8;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.rules-section {
    margin-bottom: 25px;
}

.rule-item {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.rule-item:hover {
    background-color: #f0f0f0;
}

.rule-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    vertical-align: middle;
}

.rule-item label {
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 30px);
}

.rule-item label strong {
    color: #2c3e50;
}

.generate-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
}

.generate-btn:hover {
    background-color: #2980b9;
}

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

.output-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.preview-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.preview {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    min-height: 100px;
}

.preview figure {
    float: right;
    width: 300px;
    text-align: center;
    font-size: small;
    margin: 0 0 15px 15px;
}

.preview img {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.preview figcaption {
    margin-top: 8px;
    text-align: left;
}

.code-section {
    position: relative;
}

.code-output {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: pointer;
    border: 2px solid #34495e;
}

.code-output:hover {
    border-color: #3498db;
}

.copy-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
    font-weight: 600;
}

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

.copy-message {
    margin-left: 15px;
    color: #27ae60;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.copy-message.show {
    opacity: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .preview figure {
        float: none;
        width: 100%;
        margin: 0 0 15px 0;
    }
}
