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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #e6e8fe 0%, #1f28ff 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(to right, #ffffff, #000aff);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #106ebe;
    flex-shrink: 0;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #000aff;
}

.header-info {
    margin-left: auto;
}

.header-info span {
    color: white;
    font-size: 16px;
}


.main {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.format-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.new-format-btn {
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.new-format-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.new-format-btn.active {
    background: #1f28ff;
    border-color: #484ef5;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

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

.copy-btn:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.copy-btn.copied {
    background: #2ecc71;
}

.text-editor {
    min-height: 200px;
    max-height: 400px;
    padding: 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1.6;
    outline: none;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.text-editor:focus {
    border-color: #1f28ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.text-editor:empty::before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
}

.text-editor::selection {
    background: rgba(102, 126, 234, 0.3);
}

.info-section {
    background: #e8f4ff;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #1f28ff;
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    padding: 5px 0;
    color: #34495e;
    position: relative;
    padding-left: 25px;
}

.info-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    color: #7f8c8d;
    font-size: 14px;
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .format-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .editor-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-btn {
        width: 100%;
    }
}
